.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Excel rendering format

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :


I have a requirement to develop a report where I have to show data in both ssrs and in excel format rendering. But when I am rendering the report in excel format, all the excel cells are not showing up any borders. How can I show the all the cell border and formatting correctly in excel? Please suggest..



View Complete Post

More Related Resource Links

Export Dataset to excel sheet in a required format?



I know how to export a grid view to excel.

But here i have a Dataset which consists of data like below and also it need to display in a required format like below.

pno psubno pstate pdetailid pdetails

 12    1          CA         1           cbsdjcbdjc     

12     1          CA          2        cndcnjdcjcj

12     2           VA         4          xcndwkfcgygry

13     1            AL        1           ncdcnjdcndj

My excel sheet  should like this.

pid       pstate     

 12/1      CA             &nb

Save excel in .xslx format using c#



My existing code converting xml in to excel and it is saving excel in .xls format.

But i need to save it in .xlsx format .

Existing code for converting xml...

XmlDataDocument xmlDataDoc = new XmlDataDocument();
            XslCompiledTransform xslTransform = new XslCompiledTransform();
            // Generate Excel Report
            using (XmlTextWriter xmlWriter = new XmlTextWriter(outputFileAndPath, System.Text.Encoding.UTF8))
                xmlWriter.Formatting = Formatting.Indented;
                xmlWriter.Indentation = 3;

format row in excel

i export datagridview datat to excel,but now how to format the first row to BOLD  Excel.ApplicationClass ExcelApp = new Excel.ApplicationClass(); ExcelApp[1,1]="AAA"; how to format this cells to bold

Trouble importing strange column format report from Excel 2007 to SQL 08

Hi, I'm not sure whether this belongs in this section or the SSIS one so hopefully I've got it right!  Hoping someone will be able to help with a problem I'm having importing a report with header and detail rows from our antiquated POS system into SQL 2008 tables.  The reports export in Excel 2007 format and for each header row there can be one or more detail rows starting from column B.  As such I've tried several things such as openrowset, an Access 12.0 OLE DB source in SSIS and even COM automation of Excel to try and write a conditional split which will hold the header details in variables then write them to rows alongside the detail rows.  I've pasted a small sample of the data here as I wasn't able to attach it: 01/07/2010 @ 11:18 Page: 1 RECEIVING: Voucher Journal Sort: VC|Str|Vou Date|Vou #|Document SID Filter: Voucher Date: 01/06/2010@12:00a..30/06/2010@11:59p Include Item detail: DCS|Item#|Desc1|Attr|Material|Size|Qty VC Str Vou Date Vou # Qty ABC 001 15/06/2010 12345 38 E NN 66 200148 XXXXXXXX RED SHAD E NN 66 200149 YYYYYYYYY BLACK GO E PP 60 200154 ZZZZZZZZZ BLACK CDE 002 16/06/2010 13839 8 F SA 35 217500 XXXXXXXX Natural F SA FL 218674 YYYYYYYYY Chalk F SA WE 221462 ZZZZZZZZZ White FGH 001 21/06/2010 13905 3 F SH 85 126260 XXXXXXXX Navy IJK 001 23/06/2010 13914 3 E AA 61 250005 YYYYYY

Unable to export data to an excel file in grid format!!!

I'm exporting data to an excel sheet from the ojects list. The data is exporting to excel sheet well, but I'm unable to see the grid format for the data. The data is looking with out the rows and columns lines. I think I'm missing to set some property or somethnig ehwn exporting.   Any help would be really appriciated.

date format in excel using c#

i have a datagridview and one of the column is date with format dd/MM/yyyy HH:mm:ss but when i export to excel the date format become 'd/m/yy HH:mm' how can i format the column in excel with the date format 'dd/MM/yyyy HH:mm:ss' i am using below method Excel.ApplicationClass ExcelApp = new Excel.ApplicationClass(); Excel._Worksheet oSheet;  oSheet = (Excel._Worksheet)oWB.Worksheets[1];

ASP.NET-Gridview - Export to excel- column format

Hi All, I am exporting gridview data into excel sheet. I have a column  which is a code for which data is like 012,013 etc. But when this data is being exported , in the excel sheet I can see the data as 12,13,14. but actually it should be 012.... Is there any way to specify the format of such columns in my datatable so that they are in the same manner as in the database? Please provide some information on this.Thanks in advance.

Need to find File Share Excel Rendering time--SSRS 2008

we are using SSRS 2008 file share subscription to generate EXCEL reports,Requirement here is need to find the file rendering/completion time in order to send the excel file as attachement using xp_senddbmail. Your help is highly appreciated-- Sathish

Determine the Current Report Rendering Format


I have several reports in SSRS 2005 (SharePoint Integrated Mode) that have Jump to URL navigation links.  The links were working intermittently, and the fix I implemented was to use a Javascript window.open command for the links, and it worked.  However, now the links do not work when the reports are exported to Excel because it doesn't support Javascript.  I'm trying to satisfy the users' requirements of having the links work regardless of how the report is rendered.  Is there a way that I can use custom code to determine the current URL (with query string parameters) so that I can parse it to determine whether the report is currently being rendered as HTML, Excel, PDF, etc.?  If not through parsing the URL, is there another way to go about this that I'm missing?

Thanks in advance,


SSRS 2005 Render Format Excel Issue with Time Field


I have a report that uses a datetime field but gets populated only with the time. So, in SQL db, it gets stored with a default date value of 1899-12-30 12:01:01 with the correct time filled in. Report in SSRS Preview mode displays the value just fine when I use the Time format in Layout mode. I build and deploy and able to view the report in a web browser with no problem displaying the time field. But when I subscribe to the report and choose Excel render format, when I open up the Excel file from the email that was sent, I get negative decimal values. I have tried every possible Time format in SSRS but I get the same result. I also tried just the default and still gives me negative decimal values that show up as ####### in Excel.

Any help will be greatly appreciated. Thanks

How to Convert Excel 2003 (.xls) format to Excel 2007 (.xlsx) programmatically in asp.net


Hi everybody

I am using a function to save dataset tables to excel files (some xml method http://www.codeproject.com/info/search.aspx?artkw=xls+to+xlsx&sbo=kw ) in xls format(excel 2003) but the excel file which is created taking 10 times more file size than conventional one.

And after that when I am converting to excel 2007 format I am getting the normal size for that file.

Now can anyone tell me how to convert excel 2003 file format to excel 2007 file format programmatically through asp.net

Thanks everyone in advance.


Excel Services / Web Access Line Chart Rendering

I have noticed in beta 2 that line charts are significantly pixelated / low res when the chart is rendered via Excel Services / Web Access, as compared to how the full Excel client renderes it.  Has this been fixed in the production release of Sharepoint 2010?  If not, are there any plans to improve this later? Our user community likes almost everything else but this about Excel Serivces. Unfortunately, the lack of presentation quality line charts in Excel Services maybe enough to disqualify our wide spread adoption of this great tool.  Help!

Difference in Excel Format Display in Different Machines when i export from ssrs2008R2


i develop one report  and i am using ssrs2008R2

  • when i exporting into excel sheet its dispaly perferct in my mechine (means printview shows perferct with looose any column )
  • when my tester exporting into excel sheet its dispaly different meas missing last coloums in report  

Both are using WINDOWS7 Enterprice ,office2007 ,ssrs2008R2  

Please note that the reports gets generated in my machine, say System A, as expected. But as I figured out that in some machines, say System B,  the reports generated are having alignment problems.
I had compared the System A and System B machines in the following parameters :
1) System Resolution - 1024x768 (Same)
2) Microsoft Office Excel Versions - 2007 (Same)
3) Remote Desktop Login into System B from System A -- Reports are properly displayed
    Remote Desktop Login into System A from System B -- Reports are not properly displayed

can Plz help me as possible as earliy

my mail address :praveen6867@gmail.com

Generate report in Excel format with formulas



I have a report with simple calculations (adds some fields). The report is requested in excel format via Reporting Services WebService.

I would like to have the generated excel file to have the formulas, not just the results. I tried to put the formula text in report definition, but it does't work, it appears in excel as text, not as formula.

How can I do this?



move table from excel to sql in pivot format.


Hi All, i have a table in excel as follows and i want to move all records from excel to sql but in pivot format.

field 1              S5803                      S5597                  S5825

A002             S5803_v12009       S5597_v12009        S5825_v12009

-----               --------------           -------------              --------------

and the table i want in sql as :

Code          Contract         MaterialCode

A002             S5803          S5803_v12009

A002             S5597       

SOAP API Rendering In HTML4.0 format with Toggle Items

I have been combing the Internet trying to find a way to use the SOAP API 
(ReportExecution2005) web service to render a report to HTML4.0 format with 
toggle items.  From what I have read, the new web services should provide 
ASP.NET server-side postbacks from the toggle item images, but so far I have 
seen only the same behavior as was in RS 2000, which was that the toggle item 
images pointed back to the ReportServer address.  The following is the device 
info settings that i have used to get the images to show up on the aspx page:


If I switch the HTMFragment to True I don't get any toggle item images to 
render on the page but the report still shows up, and when I actually set the 
StreamRoot paramter to something like this 
"http://[server]/[virtualdirectory]/GetImage.aspx?reportpath=[path]&streamid=" to render the toggle item

How to convert InfoPath form from sharepoint form library (xml format) to Excel format?


I've read about Document Converters in Sharepoint, and using xslt and xml mapping. 

What is the best way to convert InfoPath form with data in sharepoint form library (in xml format) to Excel format?

And how to do it?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend