Re: VFP to XLSX file

Author: Allen

Posted: 2016-05-05 at 02:02:42

why have you got "" as well as & ?

Al

-----Original Message-----

From: Sytze de Boer

Sent: Thursday, May 5, 2016 2:09 AM

To: profoxtech@leafe.com

Subject: VFP to XLSX file

I just can't figure what I'm doing wrong with this code. Can anyone assist

The spreadsheet I want to place information into has about 15 Sheets

Foxdata has around 500 entries

With loExcel

.Workbooks.Open(lcFile)

Scan

Select foxdata

If !balance=0

Mdata =Alltrim(foxdata.sheet2) && EG "J16"

*Msheet="SHEET"+ALLTRIM(sheet1) && EG "Expenses"

Msheet="SHEET"+ALLTRIM(STR(sheetnum)) && If I use the sheet number

instead

.Sheet("&msheet").Select

This is where it comes up with error "invalid index"

.Range("&Mdata").Select

I get an occasional error here

.Selection=foxdata.balance

Endif

Endscan

.ActiveWindow.Close(xlSaveChanges)

.Quit()

Endwith

--

Kind regards,

Sytze de Boer

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/6734B96B08084A9B8048F0B4682908CD@gslredacer

** 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.

©2016 Allen