Click here to Skip to main content
16,005,149 members
Home / Discussions / C#
   

C#

 
QuestionHow to split a datatable?? Pin
Member 455443326-Feb-09 1:24
Member 455443326-Feb-09 1:24 
AnswerRe: How to split a datatable?? Pin
moon_stick26-Feb-09 2:54
moon_stick26-Feb-09 2:54 
QuestionTransform Excel to PDF Pin
abbd26-Feb-09 0:30
abbd26-Feb-09 0:30 
AnswerRe: Transform Excel to PDF Pin
Shyam K Pananghat26-Feb-09 0:34
Shyam K Pananghat26-Feb-09 0:34 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 2:14
abbd26-Feb-09 2:14 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 2:32
abbd26-Feb-09 2:32 
AnswerRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 2:42
Mirko198026-Feb-09 2:42 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 3:14
abbd26-Feb-09 3:14 
Thank you verry mutch for your help, i do like this :

<br />
 static void Main(string[] args)<br />
        {<br />
            ApplicationClass excelApplication = new ApplicationClass();<br />
            Workbook excelWorkBook = null;<br />
<br />
        <br />
<br />
            string paramSourceBookPath = @"C:\2.xlsx";<br />
            object paramMissing = Type.Missing;<br />
<br />
            string paramExportFilePath = @"C:\test.pdf";<br />
            XlFixedFormatType paramExportFormat = XlFixedFormatType.xlTypePDF;<br />
            XlFixedFormatQuality paramExportQuality =<br />
                XlFixedFormatQuality.xlQualityStandard;<br />
            bool paramOpenAfterPublish = false;<br />
            bool paramIncludeDocProps = true;<br />
            bool paramIgnorePrintAreas = true;<br />
            object paramFromPage = Type.Missing;<br />
            object paramToPage = Type.Missing;<br />
<br />
        <br />
<br />
        try<br />
        {<br />
            // Open the source workbook.<br />
            excelWorkBook = excelApplication.Workbooks.Open(paramSourceBookPath,<br />
                paramMissing, paramMissing, paramMissing, paramMissing,<br />
                paramMissing, paramMissing, paramMissing, paramMissing,<br />
                paramMissing, paramMissing, paramMissing, paramMissing,<br />
                paramMissing, paramMissing);<br />
<br />
            // Save it in the target format.<br />
            if (excelWorkBook != null)<br />
                excelWorkBook.ExportAsFixedFormat(paramExportFormat,<br />
                    paramExportFilePath, paramExportQuality,<br />
                    paramIncludeDocProps, paramIgnorePrintAreas, paramFromPage,<br />
                    paramToPage, paramOpenAfterPublish,<br />
                    paramMissing);<br />
        }<br />
        catch (Exception ex)<br />
        {<br />
            Console.WriteLine(ex.ToString());<br />
        }<br />
        finally<br />
        {<br />
            // Close the workbook object.<br />
            if (excelWorkBook != null)<br />
            {<br />
                excelWorkBook.Close(false, paramMissing, paramMissing);<br />
                excelWorkBook = null;<br />
            }<br />
<br />
            // Quit Excel and release the ApplicationClass object.<br />
            if (excelApplication != null)<br />
            {<br />
                excelApplication.Quit();<br />
                excelApplication = null;<br />
            }<br />
<br />
            GC.Collect();<br />
            GC.WaitForPendingFinalizers();<br />
            GC.Collect();<br />
            GC.WaitForPendingFinalizers();<br />
        }  <br />
<br />
<br />
        }<br />


But unfortunately, it doesn't work, help me please, thank you verry mutch.
GeneralRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 3:24
Mirko198026-Feb-09 3:24 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 3:30
abbd26-Feb-09 3:30 
GeneralRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 3:35
Mirko198026-Feb-09 3:35 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 4:07
abbd26-Feb-09 4:07 
AnswerRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 4:40
Mirko198026-Feb-09 4:40 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 4:51
abbd26-Feb-09 4:51 
GeneralRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 4:56
Mirko198026-Feb-09 4:56 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 5:05
abbd26-Feb-09 5:05 
GeneralRe: Transform Excel to PDF Pin
Mirko198026-Feb-09 5:27
Mirko198026-Feb-09 5:27 
GeneralRe: Transform Excel to PDF Pin
abbd26-Feb-09 5:55
abbd26-Feb-09 5:55 
QuestionRe: Transform Excel to PDF Pin
abbd26-Feb-09 6:29
abbd26-Feb-09 6:29 
AnswerRe: Transform Excel to PDF Pin
abbd26-Feb-09 23:02
abbd26-Feb-09 23:02 
QuestionAdd XML to dll project Pin
Ronenb26-Feb-09 0:22
Ronenb26-Feb-09 0:22 
AnswerRe: Add XML to dll project Pin
Shyam K Pananghat26-Feb-09 0:32
Shyam K Pananghat26-Feb-09 0:32 
QuestionAssemblyInfo Version Number Pin
David Muir26-Feb-09 0:19
David Muir26-Feb-09 0:19 
AnswerRe: AssemblyInfo Version Number Pin
Shyam K Pananghat26-Feb-09 0:27
Shyam K Pananghat26-Feb-09 0:27 
GeneralRe: AssemblyInfo Version Number Pin
David Muir26-Feb-09 0:34
David Muir26-Feb-09 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.