Import Excel files into fpspreadsheet lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- JD · 2016-03-19 12:27 Hi there everyone, I would like to know if fpspreadsheet can import an Excel file, modify certain cells & then save the file. Somebody asked me this question but I don't know the answer. The issue was to write the results of database queries into certain cells in an already existing spreadsheet. I did it with VBA & OLE many years ago but I don't use Microsoft Office anymore & I have no intention of using Visual Studio Community to do it. I would rather say it is not possible.  I tried using the visual WorkSheetGrid control to import a small Excel file (by setting its workbook source to the file) & while I can see the contents of the file at runtime, I cannot see the file contents at designtime. Thanks, JD ---------------------------------------------------------------------- wp · 2016-03-19 13:22 Quote from: JD on March 19, 2016, 01:27:52 pmI would like to know if fpspreadsheet can import an Excel file, modify certain cells & then save the file. In principle, yes, this is possible. BUT: A large part of fpspreadsheet was created by reverse engineering and I could write a long list of features which are not supported or not implemented in the way Excel expects them. So - if your file is "simple" you may be lucky and the modified file will be the same as before, except of course for the changes that you made. If you're not you will miss some features: maybe some formatting has changed, maybe a gradient fill is gone, maybe an embedded chart is not there any more, or whatever. But just give it a try. I wonder why you don't see the file content at designtime in the worksheet grid. It should work - I just tested it. Make sure that the file format is selected properly or the AutoDetect format is checked before entering the file name. Note that you don't need the grid and the visual controls to modify an Excel file, they do not support all the features implemented in the TsWorkbook/TsWorksheet (pagelayout, embedded images, header /footer etc.). Read the wiki docs to learn how to do this. ---------------------------------------------------------------------- Jurassic Pork · 2016-03-19 23:42 hello JD, QuoteI tried using the visual WorkSheetGrid control to import a small Excel file (by setting its workbook source to the file) & while I can see the contents of the file at runtime, I cannot see the file contents at designtime. have you a TsWorkbookSource component in your Form ? Friendly, J.P