LFileSettings::SetExcelOptions

Summary

Sets the file options used by LEADTOOLS when loading Excel files (XLS or XLSX/XLSB).

Syntax

#include "ltwrappr.h"

static L_INT LFileSettings::SetExcelOptions(pOptions)

Parameters

const pFILEEXCELOPTIONS pOptions

Pointer to a structure that contains the options used when loading Excel files.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The values set by this function are valid for the current thread. To change the values used by the current thread, this function must be called again.

To get the current options used when loading an Excel file, call LFileSettings::GetExcelOptions.

This function replaces LFileSettings::SetXLSOptions.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT TestExcelOptions(LBitmapBase* pLBitmap) 
{ 
   L_TCHAR* pszFileName = L_TEXT("1.xlsx"); 
 
   FILEEXCELOPTIONS options; 
   L_INT nRet = LFileSettings::GetExcelOptions(&options, sizeof(options)); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   options.uFlags |= EXCEL_FLAGS_SHOWGRIDLINES; 
   LFileSettings::SetExcelOptions(&options); 
 
   LFile file(pLBitmap, pszFileName); 
   return file.Load(0, ORDER_BGRORGRAY); 
} 
Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.