Conversion word documents to excel or pdf to excel

Pls, is it possible for aspose products to convert a word document to an excel sheet accurately. Can you point me to some vb.net or c# examples so i can build on in this regard.


I actually have an assignment to convert a pdf report to an excel sheet, i figured that since i searched the forum and could not find a wa to convert from pdf to excel directly it may be an option to do so from pdf to word and then from word to excel.

Please any help in this regard will be appreciated.

Thanks

Hi Lanre,

Thanks for your query. Unfortunately, there is no direct way to convert Word document to Excel. However, it is possible using Aspose.Words+Aspose.Cells. I have attached a simple converter for you (See the attached class). Please use the following code snippet to convert Doc/Docx to Excel file.

Document doc = new Document(@"in.doc");
ConverterDoc2Xls converter = new ConverterDoc2Xls();
Workbook wb = converter.Convert(doc);
wb.Save("out.xls");

Please let us know if you have any more queries.

Thanks for your response, I will look this up immediately.


However, i have an issue trying to convert from a pdf to a word document. The converted document could not be editted, is this the format aspose.pdf converts to document? The converted document was in form of textbox objects and i could not make ant serious edit on the converted document. Pls am i missing something?

I have attached the pdf file i was trying to convert to document for a clearer picture so you can try as well.

Thanks

I have tried the ConvertDoc2Xls class and it just converts the entire document into 1 column, it does not recognise tables. If you check the pdf file i sent, it contains tables with many rows and columns, if i wanted to convert something like that to excel, how would it be possible. You can use the same pdf file to try out the conversion to word and excel


thanks

Hi Lanre,


Thanks for sharing the further information. It seems that this is an issue (PDF to Doc conversion) with Aspose.PDF component. The tables in output Doc file are not properly formatted. However, my colleagues from Aspose.PDF team can give you a better answer on this. I am moving this forum thread to Aspose.PDF forum and Aspose.PDF team will reply you shortly.


<span lang=“EN-GB” style=“font-family:“Courier New”;mso-ansi-language:EN-GB;mso-no-proof:yes”>Aspose.Pdf.Document pdf = new
Aspose.Pdf.Document(MyDir + “Schedules.pdf”);<o:p></o:p>

// create DocSaveOptions object

DocSaveOptions saveOptions = new DocSaveOptions();

// set the recognition mode as Flow

saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;

// set the Horizontal proximity as 2.5

saveOptions.RelativeHorizontalProximity = 2.5f;

// enable the value to recognize bullets during conversion process

saveOptions.RecognizeBullets = true;

pdf.Save(MyDir + "Pdf-Word.doc", saveOptions);

Hi Lanre,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details and template file.

I am a representative of Aspose.Pdf team. Following are the details as per your requirements:

ventis:
However, i have an issue trying to convert from a pdf to a word document. The converted document could not be editted, is this the format aspose.pdf converts to document? The converted document was in form of textbox objects and i could not make ant serious edit on the converted document. Pls am i missing something?

There are two save modes while converting the PDF document to Doc using Aspose.Pdf for .NET. You can use the above code shared by Tahir (with DocSaveOptions.RecognitionMode.Flow;) to convert the PDF to Doc to avoid textbox conversion. However, as per my testing with your template file, I am able to notice the formatting issues in the generated doc file when using Flow mode. I have registered an issue in our issue tracking system as PDFNEWNET-34327 for rectification.

Regarding PDF to Excel format conversion, I am afraid; the feature is not supported at the moment. We have a new feature request in our issue tracking system with issue id: PDFNEWNET-33541. Our development team will further analyze the feature and share their feedback.

We will notify you via this forum thread regarding any updates against the above issue.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-33541) have been fixed in Aspose.Pdf for .NET 8.6.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)