i wanna know
Can jcom only print the real file,like:
ExcelApplication excel = new ExcelApplication(rm);
ExcelWorkbooks xlBooks = excel.Workbooks();
ExcelWorkbook xlBook = xlBooks.Open(fname);//fname="d://xxx.xsl"
ExcelWorksheet xlSheet = excel.ActiveSheet();
and have to create a file then print it or can print some object like OutputStream? so that i dont need to creat a file in the disk.
Really thanks for ur help.
I believe it's possible ,
in VBA it looks like this :
ActiveCell.FormulaR1C1 = "a"
ActiveCell.FormulaR1C1 = "b"
ActiveCell.FormulaR1C1 = "c"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
your not forced to open ExcelWorkbook based on an existing file ,
you can add workbook(s) when you have opened xlBooks
Really thanks for your reply.The problem is now I have a file stream,I want to print it out and dont want change it into a file in the disk.I know,u say we can creat the workbook.but the workbook base on the Class "IDispatch" too,and IDispatch have a navite method (access the COM component) to creat an instance of itself if you want put a file object into it:
_invoke(dispid, METHOD, args);//args = Filename;
Now i just need the stream,otherwise I have to do the write file operation.That's the problem...:/
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.