writeInExcelCache

writeInExcelCache ( string path , boolean isXLSXformat , object valueToWrite , int row , int column , int _sheet , boolean[default:true] _forceCellType ) : void

Write a data in cache in Excel.
When all your data are setted in the cache, use writeCacheToExcelFile to send your data in the real Excel file.

Sometimes you need isXLSXformat=true with xls! Thank you Microsoft :)
Note: Excel does not tolerate values in cells larger than 32767 characters.

Debug


If you have this error :
org.apache.poi.hssf.usermodel.HSSFWorkbook cannot be cast to org.apache.poi.xssf.usermodel.XSSFWorkbook
Set another value to isXLSXformat

See also

clearExcelCache

Parameters

path

Path for Excel file of origine data.

isXLSXformat

XLSX or XLS? (if wrong generate an error HSSFWorkbook/XSSFWorkbook Exception)

valueToWrite

What you want to enter in the cell

row

Row in sheet. Row 1 = index 0

column

Column in sheet. Column A = index 0

_sheet (optional)

default:0 (first sheet)

_forceCellType (optional)

If true (default), the type of the Excel cell will be the type of the data. If false, we respect the original cell type and Grimport convert the value.