Extract Table from String

Hi ,

Is there any possible way to extract table structure from single line string , like I am using the getpdftext to get the text in single like string , but it has table structure inside it, is there any way to extract the table from it?

Thanks

Bihitak

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    In general, yes. For more details, we would need to see that text string.

  • Invoice Payment is due within 30 days from date of invoice. Late payment is subject to fees of 5% per month. Thanks for choosing DEMO - Sliced Invoices | admin@slicedinvoices.com Page 1/1 From: DEMO - Sliced Invoices Suite 5A-1204 123 Somewhere Street Your City AZ 12345 admin@slicedinvoices.com Invoice Number INV-3337 Order Number 12345 Invoice Date January 25, 2016 Due Date January 31, 2016 Total Due $93.50 To: Test Business 123 Somewhere St Melbourne, VIC 3000 test@test.com Hrs/Qty Service Rate/Price Adjust Sub Total 1.00 Web Design This is a sample description... $85.00 0.00% $85.00 Sub Total $85.00 Tax $8.50 Total $93.50 ANZ Bank ACC # 1234 1234 BSB # 4321 432 Paid 

      • 0
        Certified Lead Developer
        in reply to bihitakdass

        Hm ... is there a reason to not use the text extraction capabilities in Appian using the new AI skills. This also supports tables.

      • 0
        Certified Lead Developer

        Do you have control over the format of the string?  If so, you could add delimiters to the string and be able to parse it with simple expression.  You'd want to add delimiters like semicolon (;) or pipe (|) etc., something that's not going to appear in the text of inside a cell and confuse the thing.  Or if it already has those kind of delimiters, you're already golden.

        After that, you can use the split() function to split out the string into a list of string.  Provided that you keep the format consistently, each one of your arrays of strings should have the same length.  You can then index the first item, the second item, and so on, plugging each into a CDT.  Then you can do whatever you want to it as CDT and save the CDT to the database.

        Or you could use Record Type constructor to convert list of string into Record Type, then do whatever you want to the Record, then save it to the DB.