Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: steve sheridan
  Where is steve sheridan?
 hayward
 California - United States
 steve sheridan
 Tags
Subject: RE: container data to populate a table
Thread ID: 311099 Message ID: 311111 # Views: 42 # Ratings: 1
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, June 28, 2011 10:31:22 PM         
   


> Hi,
> I'm sure this is an easy question for you all, but where can I find the code that sends data from a container to a table?
>
> More specifically, we have a form that has a container used to enter data. A browser is attached to help look up the applicable data. I want to use this same browser on another form to send the same data to another table but I have no idea of how to accomplish this. I was thinking of copying the container to the other form, but I'm sure there is a better way. Any help is greatly appreciated.


Not very clear. if i understand you want to convert a web table to a dbf table.
this is the code for that using excel automation (open your web table with excel as a web page and save it as excel file and then easy to convert to dbf with IMPORT function.

local lcfile,afile,aa
lcFile=getfile('htm|html')  &&your web table here
if empty(lcfile)
return .f.
endi

#define xlExcel5   39
oExcel = createobject('Excel.Application')
oDOC=oExcel.Workbooks.open(lcFile)
oExcel.DisplayAlerts = .F.
oExcel.visible=.t.
afile=addbs(justpath(lcFile))+juststem(lcfile)
aa=oDOC.saveas(m.afile,xlExcel5)	
oExcel.quit
oExcel=null

&&convert to table dbf
IMPORT FROM (afile)  TYPE XL5 

brow
use

Regards
Yousfi Benameur

ENTIRE THREAD

container data to populate a table Posted by steve sheridan @ 6/28/2011 9:05:27 PM
RE: container data to populate a table Posted by Yousfi Benameur @ 6/28/2011 10:31:22 PM
RE: container data to populate a table Posted by steve sheridan @ 6/28/2011 10:40:01 PM