Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Convert image to Base64 string in VBA

Hi.

Im mapping some XML fields in a worksheet to be exported to a web page.
On of this fields is a image field and it only accepts images in a base64
string format.

how can o convert a "normal" image to a base64 string inside excel trough VBA?

thanks a Lot!!!

Speed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert image to Base64 string in VBA


What file type is the source and the converted. Are you trying to
convert BIT mapped files to JPG or something similar. You can't convert
an image to 64 bit format by just changing the string you need a
utility.

Excel VBA can't convert directly but can call other utilites that you
have installed on your PC. Excel can convert a worksheet to either JPG
or Bit mapped by savving as a picture but I don't think this is what you
want.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=168783

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Convert image to Base64 string in VBA

Hi joel.

For what i discovered today there some components that will do the trick.
Anyway, if anyone has some direct answer (code) to this please post it here!

SpeeD

P.S: it´s important that i only use common components (do not install
anything) because i have to distribute the Workbook...

"joel" wrote:


What file type is the source and the converted. Are you trying to
convert BIT mapped files to JPG or something similar. You can't convert
an image to 64 bit format by just changing the string you need a
utility.

Excel VBA can't convert directly but can call other utilites that you
have installed on your PC. Excel can convert a worksheet to either JPG
or Bit mapped by savving as a picture but I don't think this is what you
want.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=168783

Microsoft Office Help

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Convert image to Base64 string in VBA

Where are the images you need to convert located?

Base64 encoding in VB/VBA:
http://www.nonhostile.com/howto-enco...base64-vb6.asp
http://www.motobit.com/tips/detpg_Base64Encode/

Tim


"SpeeD" wrote in message
...
Hi joel.

For what i discovered today there some components that will do the trick.
Anyway, if anyone has some direct answer (code) to this please post it
here!

SpeeD

P.S: it´s important that i only use common components (do not install
anything) because i have to distribute the Workbook...

"joel" wrote:


What file type is the source and the converted. Are you trying to
convert BIT mapped files to JPG or something similar. You can't convert
an image to 64 bit format by just changing the string you need a
utility.

Excel VBA can't convert directly but can call other utilites that you
have installed on your PC. Excel can convert a worksheet to either JPG
or Bit mapped by savving as a picture but I don't think this is what you
want.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=168783

Microsoft Office Help

.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert image to Base64 string in VBA

you can try this free online service to convert image to base64 string online(http://www.online-code.net/base64-image.html).
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reading a string in a png image file [email protected] Excel Programming 2 March 18th 09 09:19 PM
how to convert image in .xls to .jpeg mottod Excel Discussion (Misc queries) 10 April 18th 08 02:28 AM
Is there any way to search image of my local drive with Image name or Image Title, Description [email protected] Excel Programming 3 August 3rd 07 01:44 PM
How do I convert a picture (bmp or jpg) to a excel button image? . Fausto Excel Discussion (Misc queries) 0 April 1st 05 06:39 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"