Rick,
Yes records. No filters. I am running the prg in the example:
CopyToExcel("C:\Test.xlsx", "Sheet1", "MyTable"). I have not touched
Craig's code except for inserting this line.
I converted 8863 records of one file and 7131 of another - no doubt it works
but seemingly - not always..
I am having problems with 2 files that I know of. One is "tr.dbf". The
number of records is 104. Originally there were 65 fields with a length of
479. I removed all numeric fields. I deleted all tags. I deleted all
integers. I deleted all currency types. At each of these steps it would
create the xlsx with only the field names in row 1 - no other rows. I was
down to 104 records and 25 fields with a width of 125. I was looking for
some "bad fields" - hidden ascii characters... maybe a "bad" field name.
Then I brought in a clients table of the same structure. It does not
convert.
But, along the way and at the end -- other tables converted properly.
I also noticed an appendxlsx.err file. It echoes the last half dozen or so
lines of Craig's code. I can generate the error file by deleting it, and
deleting the fxp and running appendxlsx.
At this point I can convert other files but not tr.dbf. Here is
appendxslx.err :
LOCAL lcBinary, lcCode
Error in line 677: Statement is not in a procedure.
_cliptext = STRCONV(FILETOSTR(GETFILE()),15)
Error in line 678: Statement is not in a procedure.
m.lcBinary = _ClipText
Error in line 679: Statement is not in a procedure.
m.lcCode = ""
Error in line 680: Statement is not in a procedure.
DO WHILE !EMPTY(m.lcBinary)
Error in line 681: Statement is not in a procedure.
m.lcCode = m.lcCode + CHR(9) + iif(Empty(m.lcCode), "m.FileBinary = ",
"m.FileBinary = m.FileBinary + ") + "0h" + LEFT(m.lcBinary, 510) + CHR(13) +
CHR(10)
Error in line 682: Statement is not in a procedure.
m.lcBinary = SUBSTR(m.lcBinary, 511)
Error in line 683: Statement is not in a procedure.
ENDDO
Error in line 684: Statement is not in a procedure.
_cliptext = m.lcCode
Error in line 685: Statement is not in a procedure.
Despite this evident problem, other files convert. Your thoughts would be
appreciated.
Carl
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Rick Schummer
Sent: Monday, October 25, 2010 1:40 PM
To: [email protected]
Subject: RE: dbf to xslx
>>But there is no data from the table. What am I missing?<<
Is it possible the table has not records, or you have a filter set, or you
implemented a filter in the CopyToExcel() function?
Rick
White Light Computing, Inc.
www.whitelightcomputing.com
www.swfox.net
www.rickschummer.com
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/000401cb748a$b3183c90$1948b5...@com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.