Open Excel without Open/Save/Cancel Options

Hi

This is Madhu..

Upto now I am familiar with, when I click on a button like Export then my query will be fired and fetches data from database and data will be inserted into Excel and Excel is asking for Open/Save/Cancel options.

But my requirement is that excel should not ask for those options and default should be Open.

Means when I click on button the excel has to open as inline with the data without open/save/cancel options.

How I can I do that?

Thnaks

Madhu

Hi Madhu,

I think you can use code lik following to set the response header for your web app:

response.setContentType("application/vnd.ms-excel"); //HttpServletResponse response
response.addHeader("content-disposition", "inline; filename=result.xls");

And I think you can check our web demo for your reference, you can get the web demo from our public release archive. Thank you.

Hi join,

I did this inline thing in my code.

But what I want is , Initially it is asking for open/save/cancel option. After that it we can decide whether it is attachment or inline.

Means I do not want the pop-up for the excel like open/save/cancel, before it is openend in Attachment or inline

Thanks

Madhu

Hi Madhu,

We will get back to you soon for your issue.

Thank you.

Hi Madhu,

I think you may try some Windows Explorer settings for your requirement.

  • Open Windows Explorer (Click Start|Programs|Accessories|Windows Explorer in Win XP).
  • Open Tools menu and select Folder Options... menu item.
  • Now, click File Types tab in the Folder Options dialog box.
  • Select XLS extension file types and click the Advanced button.
  • A dialog box will be displayed and there are three checkbox options at the bottom.
  • Please uncheck "Confirm open after download".
  • Moreover, you may check the third option i.e.., "Browse in same window". If you want to view the Excel file in IE without starting MS Excel standalone, this checkbox should be checked.

Thank you.

Hi,

Though this thread is long dated., but I wanted to show the pivot excel in browser.

By applying the settings, I am able to bring the excel in browser., but the pivot table is by default in collapsed mode., after I click the button in the pivot table I am able to see all the data., attached the snapshot too..,

can you suggest what could be the reason for this., any suggesstion is helpful.,

we want the pivot table to made visible in expanded mode by default.,

Regards

Sundhar

Manthan Systems

Hi,

Please try our latest fix v7.2.0.4: Aspose.Cells for Java v7.2.0.4

If you still find any issue, kindly do create a sample JAVA program and share it with us, also share your template Excel files (input(if you have) + output, desired output etc.). We will check it soon.


Thank you.

Hi,

After updating the jar file, I still see the same problem.

To reproduce this issue, I have attached a war file, which u deploy in your environment and test it. This war file is same as aspose specific demos.war but I have modified it slightly to reproduce this problem. For attachement specific I have renamed this war file to aspose-cells-7.0.2.war.zip.

Steps to reproduce this problem

1. I removed all the jars from this war file to reduce the file size, while deploying pls add all aspose cells specific jars to lib folder and then start the application.

2. Click PivotTable link from main page.

3. Click CreateReport button. This will embed the excel file at the bottom of the same page.

4. The PivotSheet has the PivotTable in collapsed mode. Click any button on the pivot table, it will show the pivot table now.

Where is the problem here? What suggesstion will solve this problem?

We wanted the PivotTable to be in expanded mode by default.

Kindly let us know at the earliest, as we have a big concern on this problem with our customers.

Regards

Sundhar

ManthanSystems

Hi Sundhar,


Thanks for the project.

Could you also attach your generated file (containing the pivot table) by Aspose.Cells APIs. Moreover, please attach a file with your desired pivot table look and feel (you may manually update or create the pivot table in MS Excel). It will help us to understand you better and your actual requirements.

Thank you.

Hi,

If I open the xls file seperately, the PivotTable looks properly in expanded mode. But the problem happens only when I try to embed the same in browser.

Pls apply the system settings that was mettioned earlier to embed excel in browser, only then the excel will be opened in browser. Otherwise this problem cannot be re-produced.

Have attached the browser snapshot., and the generated xls file (abc1.xls).

We want to see the pivot table in browser as like excel.

Regards

Sundhar

Hi,

Thanks for your WAR file and the screenshots and testing it with latest version.

We have logged your issue in our database for investigation.

Development team will look into your issue and once we have some fix for you or there is some update relating to this issue, we will let you know asap.

This issue has been logged as CELLSJAVA-40180.

Hi,

Please download and try the latest fix:
Aspose.Cells
for Java v7.2.0.5



Please add following code after creating the pivottable:




pivotTable.setSubtotalHiddenPageItems(false);

pivotTable.refreshData();

try

{

pivotTable.calculateData();

}

catch (Exception e)

{

}



and try again.

Hi,

It works now. Thanks for the fix. Now I can see the Pivot table in expanded mode by default.

Any idea when this patch will be made as an offical release?

Regards

Sundhar

ManthanSystems

Hi,


Hopefully we will release our next official version in the mid of this month or so.

Thank you.

Hi,

The above patch is an official release, it is called Minor Version.

Once in a month we release another official release which is called Major Version.

Both Minor and Major versions are for production use and exactly same except that Major Version also has release notes.

So, you can use this version safely for your production use.