Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Need to read FROM Excel into Forms 4.5

Need to read FROM Excel into Forms 4.5

From: <dperez_at_juno_NOSPAM_.com>
Date: 1998/01/11
Message-ID: <QhZt.2032$aS.1114391@news.internetMCI.com>#1/1

Just in case someone who can answer this hasn't been in the oracle.tools newsgroup...

I need to read data from an Excel spreadsheet into an Oracle 4.5 form. So far, I can open the file and get the data. Everything is fine. BUT, on the real Excel workbook there will be multiple spreadsheets. I need to make sure I get to the RIGHT spreadsheet. Below is the code I'm using to open the workbook.

declare

  obj_excel 	OLE2.OBJ_TYPE;
  obj_workbooks OLE2.OBJ_TYPE;
  arg_sheets	OLE2.LIST_TYPE;

begin
  obj_excel := OLE2.CREATE_OBJ('Excel.Application');   arg_sheets := OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(arg_sheets, :control.filespec);   obj_workbooks := OLE2.INVOKE_OBJ(obj_excel, 'Workbooks');   OLE2.INVOKE(obj_workbooks, 'Open', arg_sheets);   :global.obj_excel := to_char(obj_excel); end;

The code works fine, and I can open the workbook and read the stuff fine, so I'm not real interested in changing it unless there's something significantly better, but...
Can someone provide the code that will enable me to 1. Determine which spreadsheet of the workbook I'm currently looking at 2. Switch to a different spreadsheet if necessary. The users have promised

     they'll name the sheets consistently.............. 3. How do I OPEN a spreadsheet read-only Received on Sun Jan 11 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US