dbf to excel
dbf to excel
I can create an excel spreadsheet from a dbf file, however, the collumn names in excel are the field names in the dbf file. Is there a way t o change them to names that can't be used as dbf field names - like 'Type (debit/credit)' or 'Vendor Part Number' ?
thanks
thanks
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dbf to excel
"how" did you create Spreadsheet from a Dbf ? did you "import" it within Excel ?BruceN wrote:I can create an excel spreadsheet from a dbf file, however, the collumn names in excel are the field names in the dbf file.
i did not give access to open a Dbf with Excel. I use activeX to create a Spreadsheet so i can write what i want into A1 - Z1 ( Columne Header Line )
greetings by OHR
Jimmy
Jimmy
Re: dbf to excel
oExcel := CreateObject("Excel.Application")
IF Empty( oExcel )
MsgBox( "Excel is not installed" )
RETURN
ENDIF
oExcel:DisplayAlerts := .F.
oExcel:visible := .T.
oBook := oExcel:workbooks:Open(tempfile)
IF Empty( oExcel )
MsgBox( "Excel is not installed" )
RETURN
ENDIF
oExcel:DisplayAlerts := .F.
oExcel:visible := .T.
oBook := oExcel:workbooks:Open(tempfile)
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dbf to excel
ok, i "see" you use activeX but what are your next Step ?BruceN wrote: oBook := oExcel:workbooks:Open(tempfile)
what is your Problem to change Cell A1 - Z1 using o:Value
Code: Select all
oSheet := oBook:ActiveSheet
oSheet:Cells(nRow,nCol):Value := MyValue
greetings by OHR
Jimmy
Jimmy
Re: dbf to excel
ahhh.. wasn't aware of that... i'll try it tomorrow when i take a break from drywalling and have a few minutes free.
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dbf to excel
You have the drywalling module ?? Does that come with the professional subscription ?? 2.0 ??BruceN wrote:ahhh.. wasn't aware of that... i'll try it tomorrow when i take a break from drywalling and have a few minutes free.


Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: dbf to excel
Hi, Bruce.
eXpress++ comes with several functions to export data directly into Excel files, arrays and/or databases (DC_Array2Excel() and DC_Workarea2Excel()). Maybe you should take a look at that.
Customers should never open application data with external programs. Never.
eXpress++ comes with several functions to export data directly into Excel files, arrays and/or databases (DC_Array2Excel() and DC_Workarea2Excel()). Maybe you should take a look at that.

Customers should never open application data with external programs. Never.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: dbf to excel
1 - drywalling module comes with owning a house on a bayou in Louisiana. last year in Isaac we got a foot of water. can only do repairs during summer or school breaks (I volunteer as mentor/coach to my son's world championship robotics team at his school in Tampa).
2 - why shouldn't an app be opened with an external program?
2 - why shouldn't an app be opened with an external program?
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dbf to excel
Tom and i talk about DBF etc. open by external M$ Application ...BruceN wrote:2 - why shouldn't an app be opened with an external program?
greetings by OHR
Jimmy
Jimmy
Re: dbf to excel
Hi, Bruce.
So, tell your customers not to do so. Provide exporting routines to create clipboard data, excel sheets or whatever. You have all functions for this inside eXpress++. It's one line of code to create an excel sheet from a workarea or even an array, including the button to start the process.
As Jimmy mentioned - I was talking about data. If your customers play around with Access, Excel and other great programs, using the tables while the data is in use, they create heavy trouble (at least locking and file opening will fail). The heaviest trouble comes around if they try to store the data. Your app won't be able to use those tables anymore, since they will be corrupted in > 99 percent of the situations.why shouldn't an app be opened with an external program?
So, tell your customers not to do so. Provide exporting routines to create clipboard data, excel sheets or whatever. You have all functions for this inside eXpress++. It's one line of code to create an excel sheet from a workarea or even an array, including the button to start the process.

Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."