I have been playing with the Extract PDF Tables function to extract employee details from the 97 pages of rosters on my employer's monthly insurance invoice. So far, the function has worked great. I've been able to extract specific tables from specific pdf pages, run everything through a loop, and write it all to an Excel Spreadsheet.
My issue is that some of the tables with roster information have an extra column for "Suffix", so if an employee is "John Smith III", the Suffix column is present on that table. Since there are only a few employees with a suffix in their name, there are several tables without the Suffix column.
An Example of what the two different style tables would look like:
Table 1
| First Name | Last Name | Suffix | Product | Price |
| John | Smith | III | Health | $100 |
| Luke | Skywalker | | Health | $100 |
| Ahsoka | Tano | | Dental | $20 |
Table 2
| FirstName | Last Name | Product | Price |
| Bib | Fortuna | Health | $100 |
| Din | Djarin | Dental | $20 |
This results in me getting something like this in my Excel File:
| First Name | Last Name | Suffix | Product | Price |
| John | Smith | III | Health | $100 |
| Luke | Skywalker | Health | $100 | |
| Ahsoka | Tano | Dental | $20 | |
| Bib | Fortuna | Health | $100 | |
| Din | Djarin | Dental | $20 | |
I've been playing with a sample PDF online and have been able to extract.
I've been able to write the table as a whole using by writing %ExtractedPDFTables[2].Datatable%
I've been able to write specific rows, like the first 3 rows, by using %ExtractedPDFTables[2].Datatable[0:3]%
Is there a way to exclude a column when writing these data tables to Excel?