excel spreadsheet to OI (OpenInsight 32-bit Specific)
At 28 APR 2007 06:17:07PM Robert Dunmire wrote:
I've never read from another type file to OI, nor written for that matter. I spent several hours reading the online manuals and can't say I know more now than I did before. Is it really that hard?
The excel spread sheet(employee) has two columns for employee numbers and name. The OI table (employee_no) has two fields with the the same names.
Any help with a simple explanation of how to do it, or where I can find directions written for the simple minded.
Thanks
Robert
At 29 APR 2007 12:19AM Richard Bright wrote:
Several ways to do this. I'm sure that others will suggest smarter, better ways using OLE etc… but using old technology DDE (in Help) below some snippits of code. Note need to creat an edit line on form(hidden) to use to pass the info.
* Reads Excel and updates Event Records
TOPIC =Get_Property(Win:'.EB_P3_FILE','TEXT')WorkSheet=Get_Property(Win:'.SHEET','TEXT')Row_Start=Get_Property(Win:'.ROW_START','TEXT')NumRows =Get_Property(Win:'.NUMROWS','TEXT')Data ='
Excel Speadsheet array C1 C2 C3Place_ARRAY='; ID_Array =' ;Time_ARRAY ='Temp_List='
Establish editline to function as link for DDEDDE_Parent=Win:'.EB_P3_FILE2'GoSub Read_Excel… And the guts fro another part of some code..
READ_EXCEL2:
* Retrieve All CUST CODES IN ROW X + 1 OF SPREADSHEET Sheet "Sites"New_Rec='WorkSheet=Sites'ITEM =R':(Pos + 1)* Mod the Topic to get SitesLastbit=Topic-1,'B\'Topic-Len(Lastbit),Len(Lastbit) ='Topic=Topic:'':Lastbit:'':WorkSheetX=Set_PROPERTY(DDE_Parent,'DDESERVICE','EXCEL')X=Set_PROPERTY(DDE_Parent,'DDETOPIC',TOPIC)X=Set_PROPERTY(DDE_Parent,'DDEITEM',ITEM)X=Set_PROPERTY(DDE_Parent,'DDELINK','AUTO')New_Rec=Get_PROPERTY(DDE_Parent,'DDEDATA')Convert \09\ to @vm in New_RecReturn
HTH
Richard Bright
r.bright@ark.co.nz
At 29 APR 2007 10:29AM Warren Auyong wrote:
Setup an ODBC Excel connection.
At 30 APR 2007 10:28AM dsig@sigafoos.org wrote:
Another way (non-automated) is to save the file off as CSV and read it in that way.
At 30 APR 2007 07:29PM Barry Stevens wrote:
and much betterer, save as .TXT (Tab).
convert char(9) to @fm in MyExcelFileRec