L_SetExcelOptions

Summary

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

Syntax

#include "l_bitmap.h"

L_LTFIL_API L_INT EXT_FUNCTION L_SetExcelOptions(pOptions)

Parameters

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 L_GetExcelOptions.

This function replaces L_SetXLSOptions.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

This example shows how to enable the grid lines when loading Excel files.

L_INT SetExcelOptionsExample(L_TCHAR * pszXlsFileName, 
                            pBITMAPHANDLE pBitmap)  
{ 
   L_INT nRet;  
   FILEEXCELOPTIONS excelOptions;  
 
   /* Get the current Excel options */ 
   nRet = L_GetExcelOptions(&excelOptions,sizeof(FILEEXCELOPTIONS));  
   if(nRet != SUCCESS)  
      return nRet;  
 
   /* Change load flags to show the grid lines */ 
   excelOptions.uFlags |= EXCEL_FLAGS_SHOWGRIDLINES; 
 
   /* Set new Excel options */ 
   nRet = L_SetExcelOptions(&excelOptions);  
   if(nRet != SUCCESS)  
      return nRet;  
 
   /* Now load the Excel file */ 
   nRet = L_LoadBitmap(pszXlsFileName, pBitmap, sizeof(BITMAPHANDLE), 0, ORDER_RGB, NULL, NULL);  
   if(nRet != SUCCESS)  
      return nRet;  
   return SUCCESS;  
} 

Help Version 22.0.2023.7.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.