We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

API for Aspose.Cells

My ultimate goal is to generate reports in Excel format basing on user selections. After reading documentation I understand that preparing nice looking Excel report is possible using Report Designer Client Tool inside Excel and later the same template is used by SSRS when generating report with current data. However, I am not sure if manipulating generated Excel format is possible through published Application Programming Interface for Aspose.Cells.

User wants to do the following steps in my web application:

  • select specific subset of report (Excel) columns
  • select specific order of report (Excel) columns

After these selections user wants to have report in Excel (.xlsx) generated by SSRS according to selected columns and then saved on the server automatically.

Questions:

  1. Is it possible to trigger programmatically Aspose.Cells report generation?
  2. Is it possible to have control how Excel (.xlsx) is generated?

Hi,

Thanks for your question and using Aspose.Cells for Reporting Services.

I think, this thing is not possible using Aspose.Cells for Reporting Services.

If you want to programmatically control Excel documents, then you should use Aspose.Cells for .NET instead.

However, I have forwarded your question to our development team, they will guide you better and give you advice or a workaround.

I have logged this issue in our database. Once, we have some update relating to it, we will let you know asap.

This issue has been logged as SSRS-40022.

Hi,

For your Question(s):

Is it possible to trigger programmatically Aspose.Cells report generation?

The Aspose.Cells for Reporting Services client is a report design tool. It can design, publish, view and so on. Now it does not support triggering operations programmatically.

Is it possible to have control how Excel (.xlsx) is generated?

You have two ways to do it to automatically export Excel reports:

Use Reporting Services Subscription and Delivery function. Please refer to Subscription and Delivery document.
Develop basic .Net program on report server web services interface. Please refer Reporting Services developer’s guide and report server web service.

For selecting specific subset of report (Excel) columns issues: If you use SQL Server Reporting Services 2008 or 2008R2, you may try follow operations:

  1. Install Aspose.Cells for Reporting Services at server.
  2. Designed report by visual studio 2008.
  3. No exported report items should be set to NOOUTPUT for item data element output attribute(s).
  4. Select Excel 2007 xlsx (data only) to export report.

Hi,

Thank you.

Assuming that I have installed Aspose.Cells rendering extension on Microsoft Reporting Services 2008R2 server can I call:

ReportExecutionService.Render

method on ReportExecution2005 Web Service and specify some parameter as Format argument (if so, what value?) to generate report in.XLSX file using Aspose.Cells renderer?

I assume that your rendering extension allows to create richer Excel document than standard Microsoft SSRS Excel renderer. Or at least it allows me to prepare template in Excel and use full power of Excel. True?

Hi,

You need to develop .Net program on basic of report server web services interface. Please refer Reporting Services developer’s guide and report server web service

The following code only is a function’s code segment.

e.g.

C#


string devInfo = @“False”;

string encoding;

string mimeType;

string extension;

string[] streamIDs = null;


ExecutionInfo execInfo = new ExecutionInfo();


ExecutionHeader execHeader = new ExecutionHeader();


RW.Utility.SSRS.Services.ReportExecutionService.Warning[] warnings = null;


m_ReportSerivcesExec.ExecutionHeaderValue = execHeader;


execInfo = m_ReportSerivcesExec.LoadReport(reportname, historyID);


String SessionId = m_ReportSerivcesExec.ExecutionHeaderValue.ExecutionID;


if (parameters != null)
{
m_ReportSerivcesExec.SetExecutionParameters(parameters, “en-us”);
}


byte[] result = m_ReportSerivcesExec.Render(Convert (format),

devInfo,

out extension,

  <span class="kwrd">out</span> encoding,<br>
  <span class="kwrd">out</span> mimeType,<br>
  <span class="kwrd">out</span> warnings,<br>
  <span class="kwrd">out</span> streamIDs);<br>


execInfo = m_ReportSerivcesExec.GetExecutionInfo();


return result;

Hi,

Thank you for your response and code example. My question is what specific value I need to pass as a format argument in your example to render in format: "Excel2007Xlsx - Excel 2007 via Aspose.Cells"?

byte[] result = m_ReportSerivcesExec.Render(Convert (format),
devInfo,
out extension,
out encoding,
out mimeType,
out warnings,
out streamIDs);
What specific value should have above green format parameter to render in Aspose.Cells?

(Microsoft standard renderers have predefined values: XML, NULL, CSV, IMAGE, PDF, HTML4.0, HTML3.2, MHTML, EXCEL, and Word.)

Hi,


See the document:
http://docs.aspose.com/display/cellsreportingservices/Using+DLL+Only
I think you may check the different Extensions which are registered by the product.

Thank you.

Hi,

Namespace: ReportExecution2005
Class: ReportExecutionService
Method: public byte[] Render(string Format, string DeviceInfo, out string Extension, out string MimeType, out string Encoding, out Warning[] Warnings, out string[] StreamIds )

The red format parameters value will have a value of ACXLS, ACXLSX, ACXLSB, ACXLSM, ACTXT, ACXML, ACHTML, ACCSV, ACODS and so on.