TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Resmy Ravi
NA
128
0
Excel 2003 to pdf format
Mar 7 2012 11:14 PM
hi...
I am using vs 2010 with sql ser back end.In my project i need to export an excel sheet in 2003 format to pdf file.Is it possible.Pls give me the code.
I have tried below code,but it gives an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."..
my code is
string infile = "E:\\spec.xls";
string outfile = "E:\\spec1.pdf";
Excel.Application excelApp = null;
try
{
excelApp = new Excel.Application(infile);
excelApp.Workbooks.Open(infile);
excelApp.ActiveWorkbook.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
}
finally
{
if (excelApp != null)
excelApp.Quit();
}
Reply
Answers (
1
)
How to format file sizes?
program stuck in loops in same part(console applicarion)