I will explain our recent usage of calling excel from Oracle Forms with OLE
(we are looking for different solution - maybe POI)

On button pressed we trigger next procedure:
1. Create Excel.Application OLE object
2. Data transfer (Oracle Forms to Excel)
3. Dispose OLE object
We do not want to save file ofter procedure is finished!

We will like that after run our procedure one more time Excel is not started
in one more process. Is it possible to create object with existing Excel
application running and transfer data in new sheet (not new file).

Is the temporary file saving between two runs of procedure only solution of
our case? For user it will be better to save Excel file after many runs of
procedure.

Thanx for all help,

Jani




MSB wrote:
> 
> Hello Jani,
> 
> Can I ask a question please about how you are attempting to use POI?
> 
> Are you expecting to have Excel open, to then use POI to create a file and
> then, through Excel, to prompt the user to enter a name for the file? If
> so, then this cannot be accomplished. There is no way to integrate POI
> with Excel; POI is a tool that can be used to create files that Excel can
> read and to open/modify files that were created using Excel.
> 
> Perhaps if you can explain in more detail what you are attempting to
> accomplish then we can help you further.
> 
> 
> Jani Gracnar wrote:
>> 
>> Thank you for your help.
>> If I look at Quick Guide, there is a way to create new workbook:
>> Workbook wb = new HSSFWorkbook();
>> FileOutputStream fileOut = new FileOutputStream("workbook.xls");
>> wb.write(fileOut);
>> fileOut.close();
>> 
>> FileOutputStream need a string parameter workbook name but in my case
>> (excel just opened manualy, no save performed) I can not specify this
>> parameter.
>> 
>> Is any other way to create this object (in my situation) and then
>> manipulate workbook?
>> 
>> Thanx,
>> 
>> Jani
>> 
>> 
>> MSB wrote:
>>> 
>>> Yes you can do this.
>>> 
>>> The only restriction that I am aware of is the POI cannot work on a file
>>> that Excel has a lock on. By this, I mean that you cannot use POI to
>>> work on file that is already open in Excel.
>>> 
>>> 
>>> 
>>> Jani Gracnar wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Is it possible to create object of excel application which is already
>>>> open and the file is not saved as file on disk (the state after excel
>>>> is just started - no file name).
>>>> 
>>>> Thanx,
>>>> 
>>>> Jani
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Create-object-if-Excel-is-already-open-tp23757513p23767078.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to