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-tp23757513p23762948.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