I am using Aspose.Words to read quite a number of Words document. Currently, I am having a problem in reading content in table.
Please refer to the attached Word document. I understand that there will be a ControlChar.CellChar between each column in a table and 2 CellChars in a row break. Using Aspose to read the attached Words doc, I will get “Work Experience CR CR CR CR CR Education History CR CR Expected Salary CellChar 123 CR 456456456 CR …” As there is no row break for each “table row”, Aspose will read the whole 1st left cell, then only 2nd right cell.
My intending output is “Work Experience 123 CR 456456456 CR 789 Education History 33333333333 CR 6666666666 Expected Salary 7777777777 CR CR 1241412412412”. Read it line by line. separated by carriage return in between.
Of course, I am not expecting Aspose to do the rearranging of the content for me. I would like to know if there is any indication of start of a column or start of a table? e.g. after the “asfa” and before “Work Experience” there is totally no any special control char to indicate that. Just a CR. But since there are 2 continous CellChar, I am able to know end of 2nd right cell therefore know the number of line in right cell and able to predict number of line in left cell. But unfortunately, after “Expected Salary” there is no line break. So it aint working!
In short, can Aspose tell me when is the start of a table cell? or maybe position of a character in the Words so that i can guess it.
Thanks a lot.
The text information is provided as it is stored in Word document. We do not add or remove anything from it.
I can only suggest you to use document node structure as an additional source of information.
BTW, you can use DocumentExplorer to assist you in preparing the solution for your task. It will show you both document node hierarchy and text information for each node.
(Document Explorer is a part of the demo source code projects included in Aspose.Words setup pack since version 3.6. You can probably locate it in your C:\Program Files\Aspose\Aspose.Words\Demos\DocumentExplorer directory. It is shipped in source code and should be compiled before running.)
Ok. I see. Thanks. I will try to use the document node hierarchy to decide the start of table and column in text then.
Thanks for your help.