0

I would like to ask for some help (again), here's my context : I'm trying to create an Excel Worksheet that I can add some coordinates and generate an html page with a map using Google Maps API and his markers.

I have successfully created a macro that get the data from my SQL Server and that also create the html structure (tags,header,body,etc.).

Here's my problem : There is a way to create a macro that get the value of my cell (that contains the HTML structure) and transform it into a HTML page? (Also, I have to be able to save this file into a directory, because it will be used by other users)

Thanks in advance!

  • You could do this with a separate program that reads the Excel file's contents as a string, and writes that string to a file. That's fairly trivial in C# or VB. – Jim Sep 03 '15 at 01:49
  • Hi Jim. Yeah, I agree, but the problem is that has to be an Excel, because other programs are not allowed in the company. – Just another programmer Sep 03 '15 at 01:51

1 Answers1

1

Your question basically boils down to this... How do I read the value from a cell and save it to a text file? After all, an HTML file is just a text file with the .html file extension.

So, I assume you already know how to read the value of a cell. Now comes the question of how to write that string to a text file, and that part of the question has been answered before, both in MSDN articles that you can find via a Google search, and right here on SO...

https://stackoverflow.com/a/11503299/1246574

Hope this helps. Sometimes solving a seemingly complex problem is about breaking the question into simplified parts.

Community
  • 1
  • 1
Jim
  • 6,753
  • 12
  • 44
  • 72