We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Export Text

Hi, 

what is the right way of getting text from a word, excel or powerpoint document?

PDF Viewer has a function called ExtractText.

Thanks in advance

1 Reply

PE Priyanga Elangovan Syncfusion Team June 22, 2016 10:09 AM UTC

Hi Christian,

Thank you for contacting Syncfusion support

Regarding text extract in Word:

You can use the WordDocument.GetText() method of DocIO to extract the text from the Word Document. For more details about the WordDocument.GetText() method of DocIO, please refer the following online API documentation:
http://help.syncfusion.com/cr/cref_files/file-formats/docio/Syncfusion.DocIO.Base~Syncfusion.DocIO.DLS.WordDocument~GetText.html

Regarding text extract in Excel:

Yes, you can get text from a range in a Excel worksheet by using DisplayText property. Please refer the following code example to get the text from a cell in XlsIO. 


 
string text = Sheet.Range[“A1”].DisplayText;  

To know more about accessing cell or a range, please refer the following UG documentation link.
http://help.syncfusion.com/file-formats/xlsio/worksheet-cells-manipulation#accessing-a-cell-or-a-range 

Regarding text extract in PowerPoint:

In Presentation library, we don’t have a unique API available to extract text from a slide or an entire presentation. But we do have API’s to get the shape’s text within a slide. We have created a sample as a work around, please download the sample from the link below and please check if it could satisfy your requirement. 

Sample - http://www.syncfusion.com/downloads/support/directtrac/145936/ze/Sample-1270112951 

Regards,
Priyanga.E
 


Loader.
Up arrow icon