When saving the file, if the filename exists, it is not overwritten. Other than using fileExist() functions and deleting, can AdvGridExcelIO automatically be set to overwrite?
- You can control with AdvGridExcelIO.Options.ExportOverwrite what should happen when a file already exists.
2) XlsStartColumn / XlsStartRow set from which column & row the exported cells will be set
How do GridStartColumn and XlsStartColumn differ then? (or GridStartRow and XlsStartRow)
Cell in TAdvStringGrid versus cell in the XLS file.
If I set GridStartColumn, GridStartRow to 0,0 and XLSStartColumn, XLSStartRow to 1,1, the exported spreadsheet starts in column 0,0 not in 1,1. This is why I was asking if one affected import and the other export.
I cannot see this here.
Component version 3.13: Options set in component, not code.
I'm not sure what else you expect and/or what else you see?
It is confusing that the grid counts from 0 but you are now saying that the XLS counts from 1.
There is a difference, TAdvStringGrid has configurable fixed columns / rows while Excel has not, hence these differences.
Would you care to elaborate for those of us too dense to understand the differences? That has been the point of my question. So far I see no explanation as to what difference exists between setting the XLS coordinates to 0,0 as to setting them to 1,1. From running a program, changing these coordinates does nothing.
Coordinates 0,0 and 1,1 are treated the same in Excel. Setting coordinates to something like 5,10 does do an offset.
Again, as TAdvStringGrid has configurable fixed columns and rows, it's normal cells can start at coordinates 0,0 (when FixedCols = 0, FixedRows = 0) or default at 1,1 (FixedRows = 1, FixedCols = 1) So, the default GridStartCol, GridStartRow is 1,1 as default the grid has one fixed row and one fixed column. If you have no fixed columns and/or rows in the grid, you'd typically set GridStartCol, GridStartRow to 0,0
In Excel, this is different. Excel cannot have zero fixed rows or columns. There is always a fixed row and fixed column and the coordinate of the first accessible (topleft) cell is R1C1. So, default, AdvGridExcelIO.XlsStartCol,AdvGridExcelIO.XlsStartRow is set to 1,1 to direct the first cell for export to this first topleft cell, i.e. cell 1,1. If you want that the data of the grid starts at a different topleft cell in the XLS file, you'd set AdvGridExcelIO.XlsStartCol,AdvGridExcelIO.XlsStartRow to the Excel coordinates of this cell where you want the data to start.
I'm not sure how I can make this more clear.
My understanding of GridStartRow and GridStartColumn is that this is the co-ordinate of the first cell to export, not a reference to "fixed" row or column counts. The simple answer would have been: