Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract Excel Documents from general Fields.
Message
From
26/05/2005 07:42:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Extract Excel Documents from general Fields.
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Oracle
Miscellaneous
Thread ID:
01017766
Message ID:
01017766
Views:
56
Hi,
I have an Excel Document stored in a General Field. (I know they are hard to get out thats why I want to move away from them..). Anyways I have some old data I need to extract from teh General Fields and save as a file.

I tried all posted code about this but nothing works:
1) code by Vlad to remove a byte by hacking the file.
2) This code:
* Code written by Eric den Doop
SELECT 0
CREATE CURSOR dummy (gen1 G)
APPEND BLANK
APPEND GENERAL gen1 FROM c:\temp\test.xls CLASS Excel.Application

o = CREATEOBJECT("SaveDialog")
o.command1.click()
RELEASE o

USE IN dummy

*****************************

DEFINE CLASS SaveDialog AS form
Height = 289
Caption = "Save General Field Data As File"
ADD OBJECT oleboundcontrol1 AS oleboundcontrol WITH ;
Top = 8, ;
Left = 8, ;
Height = 233, ;
Width = 361, ;
ControlSource = "dummy.gen1", ;
Name = "Oleboundcontrol1", ;
Visible = .T. 

ADD OBJECT command1 AS commandbutton WITH ;
Top = 248, ;
Left = 272, ;
Height = 33, ;
Width = 97, ;
Caption = "Save As File", ;
Name = "Command1" 

PROCEDURE command1.click

IF FILE("c:\temp\output.xls")
	DELETE FILE "c:\temp\output.xls"
ENDIF

thisform.oleboundcontrol1.saveas("c:\temp\output.xls")

ENDPROC

ENDDEFINE 
However, Both solution do not work.

Does anyone have a way to get specifically excel files out of the general field and save it as a file?

BR
Tim
Next
Reply
Map
View

Click here to load this message in the networking platform