i need to export a pages to pdf, the pages will have grids on as they are reports.i have had a look at iTextSharp which for exporting JUST the grid works a treat. But when i try it with the whole page, it gets a bit confused with the images in the page, and doesnt deal with the styling particularly well.. is it possible to export a whole page in one hit, or do i have to add in page elements on a per element basis?
I need to provide an option to save an aspx page as a PDF.
The aspx page has about 15 gridviews (bound to sqldatasources) and sections headings etc. Ive had a go at using itextsharp but it seems a bit intensive for my needs. Or if anyone has a sample of using ItextSharp.
Also, I need something that is more or less "plug and play" (deadlines!) and can be deployed for network use.
The functionality works perfectly well in FireFox & IE when i checked in system testing envirenment(locally).However when in was moved on to hosting server(production environment) the functionality is not working in IE , however it is working perfectly in FireFox.
I am not sure on where to check the exact issue for.Will it be any caching related problem?.
In IE it is just not opening the download window which we will obtain when the rendered html content type is changed and response stream flushed.No exception is thrown.
I received the following response header :
HTTP/1.0 200 OK Cache-Control: private Content-Length: 15189 Content-Type: application/vnd.ms-word; charset=utf-8 Server: Microsoft-IIS/7.5 X-AspNet-Version: 2.0.50727 Content-Disposition: attachments;filename=NewAccountForm.doc X-Powered-By: ASP.NET Date: Fri, 18 Mar 2011 10:18:07 GMT X-Cache: MISS from Gateway X-Cache-Lookup: MISS from Gateway:808 Via: 1.0 Gateway (squid/3.0.STABLE10) Proxy-Connection: keep-alive
The file you are trying to open is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
When yes is clicked it opens in excel but in some other format I think for I cannot AUTOSUM or sum the values result always as zero for numbers appears as text as " 222" . even if i try to format cells with numbers it does not works.
This is an ASP.NET web app built using VS2008. I created a standalone class with a method that exports the entire page, text fields, gridviews, images, everything to an Excel worksheet. It works fine. When I dropped the same class in another web app and tried to call it from a page, I get this error message:
I have an ASP.NET site at work that uses a SQL Server 2k database.
Some pages on the site have buttons to export data via Crystal Reports and the user has the option to save or open. I also export to MS Excel using Response with content type.
Everything works fine until the workload increases and many documents are exported. What happens is that the site stops exporting when the buttons are pressed. It simply does nothing.
you can still use other features of the site but no exporting.
the only solution i've found so far is to restart IIS (Hosted on a Windows 2k3 server).
this only lasts about an hour or less and i have to restart again.
I need the code for exporting aspx report page(static content without any html component but contains css style) to excel page without using any asp.net component like datagrid or any other.Please send me the complete code.
I'm used to MySQL and PHPMyAdmin - I had to switch over to MSSQL for an ASP.net project, and I'm having tons of trouble. I'm using the express version of SQL 2008, with SQL Server Management Studio. The following are 2 questions I've been struggling with for a while:
1) How do I export the DB schema for the database? The table structure, etc.?
2) How do I export all the data in the database?
Ideally I'd like to have a .sql file that can be run wherever I need the schema or data duplicated, for example a co-worker's computer for a shared project, or online when the project is being hosted.
I'm encrypting the web.config in our web sites using aspnet_regiis. However, I want the ability to export the encryption key so if we need to move from Machine A to Machine B, asp.net will be able to decrypt it. When I run aspnetregiis -px "NetFrameworkConfigurationKey" c:keys.xml -pri, I get the following : 'Key not valid for use in specified state'. I've seen all kinds of responses online but they don't seem to apply. It's not an invalid key because when I use aspnet_regiis to encrypt sections of the web.config, they encrypt fine.
I do understand this question might seem easy to solve but I am failing to. I am supposed to write an application (in C# preferably but VB won't hurt), that read a CSV file and store the data in a SQL server database. However, here are the problems that i am facing.
1. The CSV file will keep changing because some external devices will be updating the file every 5 min
2. I would like to save the data in sql asap but I wonder how since I am afraid there could be some conflict
3. I am trying to use file changes using FileSystemWatcher but I do not know how it works really.
I've created a function that takes a datatable and exports it to excel by creating a Table.
When the file exported excel says "this file is in a different format than it's extension, do you wnat to open it anyway?". I'd like to get rid of this message if I can. and...There is an extra row at the top of the the excel file (row 0) and it's empty.
I created an MVC 3.0 project that I want to use as a template for all other applications I build. The project I am exporting is named "Template". After exporting the template and starting a new project (MyFirstApp) using that template, all of the namespaces that were originally named "Template" are changed to "MyFirstApp". This is expected behavior and this is how I would prefer it to work. However, the namespaces in the razor views do not change. they remain as "Template" ex: @model Template.Models.LogOnModel.
I'm guessing this is a bug. Is there any way around it? This was not an issue in MVC 2.
trying to export a dataset to excel directly. I'm repeating, it's a dataset to excel (NOT DATA GRID OR GRID VIEW TO EXCEL). The problem I face is formatting. I'm exporting the excel which has aroung 13 columns.
A column should be in dd/MM/yyyy 00:00:00 format. Time will always be 00:00:00. It is exporting in correct format only, but for example when the date is Jan 05, 2010, when it comes from database it shows correct format as05/01/2010 00:00:00. When it binds, it binds as 5/1/2010 00:00 which is not suppose to happen.
in my Asp.net web page (C# on backend) I use a Repeater, whose items consist of a title and a Flex chart (embedded .swf file). I am trying to export the contents of the Repeater to a Word document. My problem is to convert the SWF files into images and pass it on to the Word document.
The swf object has a public function which returns a byteArray representation of itself (public function grabScreen():ByteArray), but I do not know how to call it directly from c#. I have access to the mxml files, so I can make modifications to the swf files, if needed.
I'm looking for a way to export a Word document as a PDF. I would like to do this without the use of a "software printer" (such as CutePDF, etc.) and stick to reference assemblies if at all possible. I'm using Microsoft Office Interop Assemblies to generate a Word Document which I save to a temporary directory. So its not necessary for this solution to interact directly with Microsoft Office, unless it needs to.
I have a gridview that I am exporting to an excel file. When I open the excel file, the alternating row color extends to the end of the excel table, but I only want my 6 data columns to be formatted. How can I limit the formatting?
I have multiple gridviews to be exported to excel. 1 gridview per worksheet.
How to do that ? ( or in general how to write an html string to a worksheet )
This is to be done in asp.net , server side.
I can create multiple worksheets via epplus.codeplex.com nicely, but it works on cell level. I could export DataTable, but how to export Gridview's HTML ?
I've been working on this for a while and everything that I have read seems to tell me to use the same setup. I have been able to export the data to an xls file on my local C drive but that won't work when hosted on the server as I'll want users to export their data to their local machines as well... I guess the issue I'm having (or at least what I think am having) has to do with my response.end() function. I'll give you my code that works and the one that doesn't... In the end they will both do the same thing...Here is the code I've been playing with for my button:
[Code]....
Now here is where it will at least save on my local drive via a button in my drop down menu:
[Code]....
I need to prompt the user to save the file to a location and perhaps be able to name the file etc
On two of my web forms I have the ability to export a gridview to an excel file. On my local machine. it works. So when I click an image button it gives me the option of opening or saving a gridview as Excel.
However, when I run on the web server. It does not give me the option to open or save, it just opens the gridview as an excel document when the button is clicked.
Even stranger: I have this running on two separate forms. On one form when it opens the gridview as an Excel file it includes a tool bar, so that If a user wishes they could do a 'file', 'save'; However the other one does not have a tool bar?
Ideally I would like them to get the prompt like on the local machine, to open or save.
I have a .rdlc report created in Visual Studio and Upon executing, I wish to have the user be able to export the resulting data to Excel. How would I go about doing this
I have created several applications now allowing the user to export to excel, word, pdf, etc. But this one is a little different, the client wants to have functionality that would directly export to excel as an attachment in an email. Basically my question is, can I create the excel file without storing it to server prior to attaching and sending out the email? Or do I have to save a copy on the server before I can attach it?