Hello, Thanks for posting your code to append from XLSX type. I am getting an error "Unknown LAFIELD - Undefined". What is the correct way to call your AppendFromXLSX ? Thanks for your help !! Kent
Can you elaborate, maybe provide a sample to my email, please? The table or cursor must be opened before calling the prg. USE mytable && or SELECT mytable do appendfromxlsx WITH "my_excel_file.xlsx","mytable"
To skip first row from the xlsx document: do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",2
To get data from the third sheet, begining with the fifth row: do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",5,3
If the sheet has empty cells, then the last parameter must be true: do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",5,3,.T.
Finally, to populate only a subset of table's fields: do appendfromxlsx WITH "my_excel_file.xlsx","mytable","field1,field2,field3"
Hello again, I am back trying to test your AppendFromXLSX program. I added your PRG to my project but when I try to build the app, I get the following error Unknown LAFIELD - Undefinded. I created a new project with only 2 prg files, your appendfromxlsx.prg and testxlsx.prg with the following code: close tables ALL select 0 create cursor XTEST (FIELD1 C(100), FIELD2 C(100), FIELD3 C(100))
do AppendFromXLSX with 'c:\csi\vcms\src\j1comm\import\2025-04 Rev Share.xlsx', 'XTEST', '',0,1,.T.
But when I try to build the APP I get the error LAFIELD not found. Please help ?? My email is RocketComputers@gmail.com
As I noticed you by email, the problem seems to be in VFP's compiler itself, not in appendfromxlsx prg. Seems to be a minor bug of the VFP compiler, and you simply have to ignore the "error". Besides, if you compile the appendfromxlsx.prg alone (not as a part of a project) you will get no errors at all.
Thanks so much for looking at this weird error message. As you said, I ignored the error and your code works great in my project!! Thanks again for taking your time to create such great code and support !!!
Hello, Thanks for posting your code to append from XLSX type. I am getting an error "Unknown LAFIELD - Undefined". What is the correct way to call your AppendFromXLSX ? Thanks for your help !! Kent
RăspundețiȘtergereCan you elaborate, maybe provide a sample to my email, please?
RăspundețiȘtergereThe table or cursor must be opened before calling the prg.
USE mytable && or SELECT mytable
do appendfromxlsx WITH "my_excel_file.xlsx","mytable"
To skip first row from the xlsx document:
do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",2
To get data from the third sheet, begining with the fifth row:
do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",5,3
If the sheet has empty cells, then the last parameter must be true:
do appendfromxlsx WITH "my_excel_file.xlsx","mytable","",5,3,.T.
Finally, to populate only a subset of table's fields:
do appendfromxlsx WITH "my_excel_file.xlsx","mytable","field1,field2,field3"
Hello again, I am back trying to test your AppendFromXLSX program. I added your PRG to my project but when I try to build the app, I get the following error Unknown LAFIELD - Undefinded. I created a new project with only 2 prg files, your appendfromxlsx.prg and testxlsx.prg with the following code:
RăspundețiȘtergereclose tables ALL
select 0
create cursor XTEST (FIELD1 C(100), FIELD2 C(100), FIELD3 C(100))
do AppendFromXLSX with 'c:\csi\vcms\src\j1comm\import\2025-04 Rev Share.xlsx', 'XTEST', '',0,1,.T.
But when I try to build the APP I get the error LAFIELD not found.
Please help ??
My email is RocketComputers@gmail.com
Hello, please send me your email so we can get this working?
ȘtergereThanks !!
Hope you are ok ?? Please help with the code error? Thanks !!
RăspundețiȘtergereAs I noticed you by email, the problem seems to be in VFP's compiler itself, not in appendfromxlsx prg.
RăspundețiȘtergereSeems to be a minor bug of the VFP compiler, and you simply have to ignore the "error".
Besides, if you compile the appendfromxlsx.prg alone (not as a part of a project) you will get no errors at all.
Thanks so much for looking at this weird error message. As you said, I ignored the error and your code works great in my project!! Thanks again for taking your time to create such great code and support !!!
Ștergere