Html maker - testers required!

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
As some of you may be aware, I have been making an add-in to produce html output of selected data in Excel. The output is fairly consistent with that produced by Excel Jeanie as can be seen here:

http://www.mrexcel.com/forum/showpos...&postcount=241

the differences being:

1. the interface is a whole lot simpler
2. you can choose if you want to output all the formulas in selection or only some of them
3. the ouput colour-codes nesting levels in the formulas
4. it only does formulas and data (it doesn't report conditional formatting or data validation applied)
5. it comes as an .xla file rather than an .exe (so doesn't require Admin rights to install!)
6. the code is visible for anyone that wants to laugh (or cry) at it


The generated html should also be considerably simpler as much of the formatting and style elements are now held in a css file applied to the whole Board (Suat Ozgur has created a css class which I link to in the generated html).

It has been tested by me and Jon von der Heyden and feedback from Suat incorporated. What I need now is for some others to test and come back with any comments.

If you would like to see the file and perhaps test it, please Private Message me with your email address and I'll send you the .xla file and a .doc file with guidance notes:

The .xla file is approx 100Kb in size, so it isn't very big. It will work in all versions of Excel since xl2000, although I will be developing a specific xl2007 ribbon interface next.

Thanks!
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Eager to try this out I get stuck pretty much head on in xl2007.
I select some cells and right click in the menu option and just take the default oen. Gives me a type mismatch error 13.
Code:
Function ExcelVersion() As String
Dim temp As String
'On Error Resume Next
Select Case CLng(Application.Version) <-- here
According to the debugger:
Application.Version = "12.0"

Any ideas?
 
Upvote 0
That shouldn't happen - if you go (within the VBE) Tools>References do you see anything marked as MISSING? If so, uncheck these and try re-saving the add-in (you can do this just be closing Excel down as it automatically saves in the code).
 
Upvote 0
That shouldn't happen - if you go (within the VBE) Tools>References do you see anything marked as MISSING? If so, uncheck these and try re-saving the add-in (you can do this just be closing Excel down as it automatically saves in the code).
I can't see any labelled "missing" they tend to pop up to the top of the list don't they?
I've got 5 references checked: Microsoft Forms 2.0, Microsoft Excel 12.0, Microsoft Office 12.0, OLE Automation, Visual Basic For Applications.

Could system/language settings play in?
 
Upvote 0
Yes, it looks like a regional settings issue. So the . in "12.0" is not read as a decimal separator?

I think the workaround would be to use the Val() function instead of CLng().

Give it a try and let us know if it fixes it?
 
Upvote 0
Yes, it looks like a regional settings issue. So the . in "12.0" is not read as a decimal separator?

I think the workaround would be to use the Val() function instead of CLng().

Give it a try and let us know if it fixes it?
Had the same problem on my home computer and xl2003.
Using Val() instead of CLng() solves this issue. My regional settings uses the "," as decimal and "." as a thousands separator.
 
Upvote 0
Had the same problem on my home computer and xl2003.
Using Val() instead of CLng() solves this issue. My regional settings uses the "," as decimal and "." as a thousands separator.

Okay cool. I think using Val() is a good idea also because sometimes the version can have a letter in, so CLng() would also fail there too.

I don't have a copy of the html maker at home so I can't check at the moment, but if it is changed to Val() then you'll also need to make sure that the subsequent Select Case structure remains valid. So something like this:
Code:
    Select Case Val(Application.Version)
 
        Case Is >= 13
            MsgBox "Excel 2010 or later"
 
        Case Is >= 12
            MsgBox "Excel 2007"
 
        Case Is >= 11
            MsgBox "Excel 2003"
 
        Case Is >= 10
            MsgBox "Excel 2002"
 
        'etc...
 
    End Select
 
Upvote 0
That CLng trips me up in another place. If there are cells with text, at least that is what it seems to complain about
Code:
Function AnalyzeCell(cell As Range) As String
Dim strFormat As String, varVal As Variant
strFormat = "style="""
With cell
    If .Font.Bold Then strFormat = strFormat & "font-weight: bold;"
    If .HorizontalAlignment = xlRight Then
        strFormat = strFormat & "text-align: right;"
    ElseIf .HorizontalAlignment = xlCenter Then
        strFormat = strFormat & "text-align: center;"
    ElseIf .HorizontalAlignment = 1 Then    'And IsNumeric(.Value)
        On Error Resume Next
        varVal = CLng(.Value) <---here
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,348
Members
452,638
Latest member
Oluwabukunmi

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