ggreen86 / XLSX-Workbook-Class

VFP Class to Create an XLSX Workbook without Excel Automation or Installed
45 stars 16 forks source link

Reading an Excel worksheet into a VFP cursor #116

Closed rdewild closed 6 months ago

rdewild commented 6 months ago

Hi Gregory. I am new to your class. The documentation talks about easy way to read an Excel sheet into a VFP cursor. but I can not find any method that does so. I am currently testing with the "workbookxlsx r40\program demos\readxlsxfile.prg" program and see that it reads the data and I get it to display to debug out... so I could create a cursor with some effort. But, it sounds like you already have that built in. I just can't find it. Any hints or pointers appreciated. Robert.

ggreen86 commented 6 months ago

Robert—

Yes the class defines its own cursors for containing the spreadsheet cell data. However, it was not the intention of the class to directly use these cursors for manipulation of the data. There are methods for accessing the cell data; i.e. GetCellValue(), SetCellValue(), etc and for setting the properties of the cells (i.e., formatting, formulas, merging, etc). There are several methods for outputting a table/cursor or grid to a spreadsheet as well. See the Demo() method for examples of using some of the methods to output to a spreadsheet.

Greg

From: rdewild @.> Sent: Friday, March 8, 2024 1:34 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] Reading an Excel worksheet into a VFP cursor (Issue #116)

Hi Gregory. I am new to your class. The documentation talks about easy way to read an Excel sheet into a VFP cursor. but I can not find any method that does so. I am currently testing with the "workbookxlsx r40\program demos\readxlsxfile.prg" program and see that it reads the data and I get it to display to debug out... so I could create a cursor with some effort. But, it sounds like you already have that built in. I just can't find it. Any hints or pointers appreciated. Robert.

— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/116, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33JBKF5QLZ3UE72K2E3YXIAA7AVCNFSM6AAAAABENIEGG2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TMNJWGUZTQNY. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

rdewild commented 6 months ago

Thank you. Yes, creating an Excel from a VFP dataset is very well documented and many examples. For that purpose its an amazing class. But I am looking for something that would allow an end-user to easily import data from an excel file. Looks like this is quite possible, but just needs a little work on my end. Thank you.