How to read through files in excel rows and convert it to base64 string and upload through XML?

JackkG

New Member
Joined
Dec 10, 2014
Messages
42
Hi,

I have an excel sheet which contain file path with file name, original file name, date created and creator. I want to cycle through each file in that file path and convert it to base64 string and upload to xml with its relevant data (File Name, Date and Creator).

Sample excel sheet...

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]File Path[/TD]
[TD]File Name[/TD]
[TD]Date[/TD]
[TD]Creator[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 276"]
<tbody>[TR]
[TD="width: 276"]C:\Testing\Encode\test1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]test1[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl65, width: 75, align: right"]10/22/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 276"]
<tbody>[TR]
[TD="width: 276"]C:\Testing\Encode\test2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]test2[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl65, width: 75, align: right"]10/23/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Rich[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 276"]
<tbody>[TR]
[TD="width: 276"]C:\Testing\Encode\test3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]test3[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl65, width: 75, align: right"]10/26/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Sam[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 276"]
<tbody>[TR]
[TD="width: 276"]C:\Testing\Encode\test4[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]test4[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl65, width: 75, align: right"]10/28/2017[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Jack[/TD]
[/TR]
</tbody>[/TABLE]



I’ve a sample xml which goes like this…

PHP:
<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<field name="File Name">test1</field>
<field name="Date"> 10/22/2017</field>
<field name="Creator">John</field>
8D6AAAOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EBgAAAAAABwAEAAAAAQEA
4AJ0ZpbGUgd3JpdHRlbiBieSBBZG9iZSBQaG90b3Nob3CoIDQuMAD/7gAOQWRvYmUAZAAAAAAB
9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDAwMDAwMDAwMDAwMDAwM
OElKS0xNTk9GV1hZWltcXV5fVGVmZ2hpamtsbW5vZHV2d3h5ent8fX5/
c4SFhoeIiYqLjI2Oj4OUlZaXmJmam5ydnp+So6SlpqeoqaqrrK2ur6/
9oADAMBAAIRAxEAPwCK6Bd3Ea3CaXJDbxS2wLSSVZGVNvTmj+NTGSGIdVk+1yzFxkg0WmpdEHpc
k9vO2n21xBP+huF1ajklHWcEyxFmQer6a+or8x8CumWSx0b7mVSTO2S3mRoNOkMWnXUTGPkP3QV
2EkXpcOfAMF/Y/axsmVDqxromtzb2/
r2b+qpjjAgmSTkSY0XkpJ2J+Mslar8OZHhjkvAsv3sLp4UmuYxMPVS0ujGpkjNAKcWIDpKvwy/
Bz4rz+3+8wyxBmAk1xJDJr2l2c6xy2mlwT31xAw5Rx8jxjJ/
jXJbKLRGnfbm6foz1Dy6cPV9RvV+38Xp8vtV/3bz4YQjdZ8X1j9r67/svXp6n/UP6X/
PH1P8AizAl/9kA
</field>
<qdbapi><qdbapi><qdbapi><qdbapi>

Is there a way to achieve this through vba code or through xml itself?

Thanks!
Jack</qdbapi></qdbapi></qdbapi></qdbapi>
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Anyone who can help?
You will have more chance now that I have moved your thread out of the "Questions in Other Languages" forum. :)
Please be careful where you posy your questions.
 
Upvote 0
Any particular reason why it was posted there?
If you mean why was your original post in the 'Questions in Other Languages' forum, then it was because you posted it there. To start a new thread you have to go in to a particular forum and then click the 'Post New Thread' button so you must have gone to the 'Questions in Other Languages' forum & done that. :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top