Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML to PDF

Status
Not open for further replies.

Bijan Borazjani

IS-IT--Management
Jan 18, 2024
1
US
Good Afternoon,

i have scoured the deep recesses of the internet and cannot find a solution to my issue. I am developing a simple digital guest registry for a small business. I started with a simple jot form since they just need to collect the data. I then exported the data into an Excel sheet and now i need to get the data from that excel sheet into a PDF form that I built. It has been pre formatted in the layout that the customer needs, however when i go to use XML to get the data from the excel sheet to the PDF, i am not seeing any data fields that can be populated. I am beating my head against a wall to figure out how to get this data to populate the PDF form. Any help or guidance would be super helpful.

XML Code from Excel Sheet
XML:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="[URL unfurl="true"]http://www.w3.org/TR/REC-html40"[/URL] xmlns:x2="[URL unfurl="true"]http://schemas.microsoft.com/office/excel/2003/xml">[/URL]
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Bijan Borazjani</Author>
<LastAuthor>Bijan Borazjani</LastAuthor>
<TotalTime>0</TotalTime>
<Created>2024-01-08T18:44:06Z</Created>
<LastSaved>2024-01-18T20:32:32Z</LastSaved>
<Version>16.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>15720</WindowHeight>
<WindowWidth>29040</WindowWidth>
<WindowTopX>32767</WindowTopX>
<WindowTopY>32767</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
<FutureVer>11</FutureVer>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" ss:Size="12" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s16" ss:Name="Hyperlink">
<Font ss:FontName="Calibri" ss:Size="12" ss:Color="#0563C1" ss:Underline="Single"/>
</Style>
<Style ss:ID="s17">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" ss:WrapText="1"/>
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/>
<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/>
<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/>
<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/>
</Borders>
<Font ss:FontName="Calibri" ss:Size="11" ss:Color="#000000" ss:Bold="1"/>
<Interior ss:Color="#CCFFCC" ss:Pattern="Solid"/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1000" ss:ExpandedRowCount="13" x:FullColumns="1" x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="15.75">
<Column ss:AutoFitWidth="0" ss:Width="150" ss:Span="999"/>
<Row>
<Cell ss:StyleID="s17">
<Data ss:Type="String">First Name</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">Last Name</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">Street Address</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">City</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">State / Province</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">Postal / Zip Code</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">Email</Data>
</Cell>
<Cell ss:StyleID="s17">
<Data ss:Type="String">Condolence Message</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Tim</Data>
</Cell>
<Cell>
<Data ss:Type="String">Smith</Data>
</Cell>
<Cell>
<Data ss:Type="String">123 Sesame Street</Data>
</Cell>
<Cell>
<Data ss:Type="String">New York City</Data>
</Cell>
<Cell>
<Data ss:Type="String">NY</Data>
</Cell>
<Cell>
<Data ss:Type="String">12345</Data>
</Cell>
<Cell>
<Data ss:Type="String">Tim.Smith@Gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">Im Sorry</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Doug</Data>
</Cell>
<Cell>
<Data ss:Type="String">Manning</Data>
</Cell>
<Cell>
<Data ss:Type="String">234 Ask Blvd</Data>
</Cell>
<Cell>
<Data ss:Type="String">Beverly Hills</Data>
</Cell>
<Cell>
<Data ss:Type="String">CA</Data>
</Cell>
<Cell>
<Data ss:Type="String">90210</Data>
</Cell>
<Cell ss:StyleID="s16" ss:HRef="mailto:Amy@gmail.com">
<Data ss:Type="String">Amy@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">Hkajehjr</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Crisp E</Data>
</Cell>
<Cell>
<Data ss:Type="String">Bacon</Data>
</Cell>
<Cell>
<Data ss:Type="String">456 Pickup Ln</Data>
</Cell>
<Cell>
<Data ss:Type="String">Lafayette</Data>
</Cell>
<Cell>
<Data ss:Type="String">LA</Data>
</Cell>
<Cell>
<Data ss:Type="String">70518</Data>
</Cell>
<Cell ss:StyleID="s16" ss:HRef="mailto:Amy@gmail.com">
<Data ss:Type="String">Amy@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">We're so sorry to hear about Crisp</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Seymour</Data>
</Cell>
<Cell>
<Data ss:Type="String">Butts</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Phil</Data>
</Cell>
<Cell>
<Data ss:Type="String">McCrevas</Data>
</Cell>
<Cell ss:Index="7">
<Data ss:Type="String">philcrev@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">So sorry from the McCrevas family</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Bijan</Data>
</Cell>
<Cell>
<Data ss:Type="String">Borazjani</Data>
</Cell>
<Cell ss:Index="7" ss:StyleID="s16" ss:HRef="mailto:bijan@gmail.com">
<Data ss:Type="String">bijan@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">test</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">John</Data>
</Cell>
<Cell>
<Data ss:Type="String">Smith</Data>
</Cell>
<Cell ss:Index="7">
<Data ss:Type="String">James.Gunn@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">TESTING !@#</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Amy</Data>
</Cell>
<Cell>
<Data ss:Type="String">Borazjani</Data>
</Cell>
<Cell ss:Index="7" ss:StyleID="s16" ss:HRef="mailto:Amy@gmail.com">
<Data ss:Type="String">Amy@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">This is so sad</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Bijan</Data>
</Cell>
<Cell>
<Data ss:Type="String">Borazjani</Data>
</Cell>
<Cell ss:Index="7" ss:StyleID="s16" ss:HRef="mailto:bijan@gmail.com">
<Data ss:Type="String">bijan@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">Test 2</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">textbox_sample0</Data>
</Cell>
<Cell>
<Data ss:Type="String">textbox_sample1</Data>
</Cell>
<Cell ss:Index="7">
<Data ss:Type="String">john@example.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mollis ultricies interdum. Nullam pharetra vitae lectus eget volutpat. Integer in sodales ligula. Vestibulum pellentesque arcu in est aliquam rhoncus. Curabitur et dui quis arcu scelerisque congue. Pellentesque libero ligula, sagittis a tempus quis, finibus eget erat. Nunc sed tempor nunc. Mauris tempor odio id lorem commodo dapibus. Nulla viverra mi in magna imperdiet volutpat.</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Bijan</Data>
</Cell>
<Cell>
<Data ss:Type="String">Borazjani</Data>
</Cell>
<Cell ss:Index="7" ss:StyleID="s16" ss:HRef="mailto:bijan@gmail.com">
<Data ss:Type="String">bijan@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">test</Data>
</Cell>
</Row>
<Row>
<Cell>
<Data ss:Type="String">Bijan</Data>
</Cell>
<Cell>
<Data ss:Type="String">Borazjani</Data>
</Cell>
<Cell ss:Index="7" ss:StyleID="s16" ss:HRef="mailto:bijan@gmail.com">
<Data ss:Type="String">bijan@gmail.com</Data>
</Cell>
<Cell>
<Data ss:Type="String">Sorry for your loss</Data>
</Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>20</ActiveRow>
<ActiveCol>3</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<x2:MapInfo x2:HideInactiveListBorder="false">
<x2:Schema x2:ID="Schema32" x2:Namespace="">
<xsd:schema xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns="">
<xsd:element nillable="true" type="xsd:string" name="fields"/>
</xsd:schema>
</x2:Schema>
<x2:Map x2:ID="fields_Name" x2:SchemaID="Schema32" x2:RootElement="fields"> </x2:Map>
</x2:MapInfo>
<x2:Binding x2:ID="Binding1" x2:LoadMode="normal">
<x2:MapID>fields_Name</x2:MapID>
<udc:DataSource xmlns:udc="[URL unfurl="true"]http://schemas.microsoft.com/data/udc"[/URL] MajorVersion="1" MinorVersion="0">
<udc:Type Type="XMLFile" MajorVersion="1" MinorVersion="0"/>
<udc:Name>Binding1</udc:Name>
<udc:ConnectionInfo Purpose="Query">
<udcxf:File xmlns:udcxf="[URL unfurl="true"]http://schemas.microsoft.com/data/udc/xmlfile">C:\Users\bijan\Downloads\Guest[/URL] Sheet-2.xml</udcxf:File>
</udc:ConnectionInfo>
</udc:DataSource>
</x2:Binding>
</Workbook>

XML From PDF
XML:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--  Created from PDF via Acrobat SaveAsXML  -->
<!--  Mapping Table version: 28-February-2003  -->
<TaggedPDF-doc>
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 9.1-c001 79.675d0f7, 2023/06/11-19:21:16 ">
<rdf:RDF xmlns:rdf="[URL unfurl="true"]http://www.w3.org/1999/02/22-rdf-syntax-ns#">[/URL]
<rdf:Description xmlns:xmp="[URL unfurl="true"]http://ns.adobe.com/xap/1.0/"[/URL] xmlns:dc="[URL unfurl="true"]http://purl.org/dc/elements/1.1/"[/URL] xmlns:xmpMM="[URL unfurl="true"]http://ns.adobe.com/xap/1.0/mm/"[/URL] xmlns:pdf="[URL unfurl="true"]http://ns.adobe.com/pdf/1.3/"[/URL] xmlns:adhocwf="[URL unfurl="true"]http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/"[/URL] rdf:about="">
<xmp:ModifyDate>2024-01-18T14:29:37-06:00</xmp:ModifyDate>
<xmp:CreateDate>2024-01-08T10:20:51-06:00</xmp:CreateDate>
<xmp:MetadataDate>2024-01-18T14:29:37-06:00</xmp:MetadataDate>
<xmp:CreatorTool>Adobe Acrobat Pro (32-bit) 23.8.20458</xmp:CreatorTool>
<dc:format>xml</dc:format>
<xmpMM:DocumentID>uuid:6a46ae45-d9cc-4498-ba37-66a3c1dde9bb</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:9eab79c9-9094-4043-a7c5-93dea53245d4</xmpMM:InstanceID>
<pdf:Producer>Adobe Acrobat Pro (32-bit) 23.8.20458</pdf:Producer>
<adhocwf:state>1</adhocwf:state>
<adhocwf:version>1.1</adhocwf:version>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
<?xpacket end='r'?>
<bookmark-tree>
<bookmark title="Blank Page">
<destination structID="LinkTarget_527"/>
</bookmark>
</bookmark-tree>
<Figure id="LinkTarget_527">
<ImageData src="images/Test 2_img_0.jpg"/>
Relatives & Friends
</Figure>
<P>
<Form/>
</P>
<P/>
<P>e </P>
</TaggedPDF-doc>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top