Problem with Wizard (1 Viewer)

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Hi, attempting to load an html file via Access 2019 New Data Source - From File - HTML Document.
I get
Microsoft Access can't find the wizard. This wizard has not been installed, or there is an incorrect setting in the Windows Registry, or this wizard has been disabled.
To reenable this wizard, click the File tab, and click Access Options. Click Add-lns, and then in the Manage list, click Disabled ltems, and then click Go. Rerun Microsoft Access or Microsoft Office Setup program to
reinstall the wizards. lf the missing wizard is not a Microsoft Access wizard, reinstall it using the Add-in Manager.

However this tells me there are no Disables Items. Add Ins shows

No Inactive Application Add-Ins
No Document Related Add-ins
No Disabled Application Add-Ins

Is there anything else I can try ? Thanks.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:58
Joined
May 7, 2009
Messages
19,175
html file or xml file.
afaik, access can open an xml file (but must be in well-formed structure).
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
It's html.
I tried on another computer (with Access 2010) but got the same error.
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Hi dbGuy sure thing...
 

Attachments

  • TMA1.zip
    12 KB · Views: 155

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:58
Joined
May 7, 2009
Messages
19,175
id like to see how this can be resolved using the Wizard:)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:58
Joined
May 7, 2009
Messages
19,175
just plainly, i want to see and learn :)
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
OK. Me too I guess. I thought you may be suggsting the wizard wasn't the tool to use.
Anyway got frustrated trying and used an app to convert it into text, then wrote some code to add it to a table.
But I'm not out of the woods and left a msg in the table section here.
I've found Access is adding chr$(13) ahead of what is written to each record.
So now trying to sort out why. May be some new thing in accdb file, perhaps?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:58
Joined
Oct 29, 2018
Messages
21,358
Hi dbGuy sure thing...
Hi. My wizard came up without a problem, but then it gave me this error about your file.

1607143333041.png
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Ah, I got that too - once - but could never do it a 2nd time.
It's rubbish don't you think.. file does contain data and is only 109k. Could that really be too large?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:58
Joined
Oct 29, 2018
Messages
21,358
Ah, I got that too - once - but could never do it a 2nd time.
It's rubbish don't you think.. file does contain data and is only 109k. Could that really be too large?
Hi. I have to go to bed now. I'll pick it up again tomorrow. Good night.
 

isladogs

MVP / VIP
Local time
Today, 10:58
Joined
Jan 14, 2017
Messages
18,186
Hi
I get the same error and haven't looked into the cause yet.
I suspect that although it contains data, it isn't in a format that can be imported into a table due to the lack of clearly defined fields

I tested my theory by copying the file and pasting it into a single record in a long text / memo field:

1607161795332.png


Anyway, if it helps, you can open it in Access using a web browser control
1607157754592.png
 
Last edited:

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Thanks Colin. I've since found I can drag it into Excel and it gives the correct output (without any error) on the worksheet (once the font colour is set black).
But I can't read it there, I need to identify 2 indented rows (nicely shown in your image). In Excel each row when read into a string, has no leading spaces or tabs. I hope to work out why.
So I have been adding a character ahead of the affected rows in VBA
Code:
Sub Converter()
    'Convert Tamla doc to split/identify components
    Dim ff As Integer
    Dim Dat As Variant
    Dim i As Integer
    Dim xDat As Variant
    ff = FreeFile
    Open Application.CurrentProject.Path & "\TMA1.html" For Input As #ff
        Dat = Input(LOF(ff), 1)
    Close #ff
    
    'split File on 'margin-left:36
    xDat = Split(Dat, "'margin-left:36.0pt;background:black'><b><span style='font-size:10.0pt;" & vbCrLf & "color:#9EACD9'>")

    For i = 0 To UBound(xDat)
            If Left(xDat(i), 1) = "<" Then
        Else
            xDat(i) = Chr$(253) & xDat(i)
        End If
    Next
    Dat = Join(xDat, "'margin-left:36.0pt;background:black'><b><span style='font-size:10.0pt;" & vbCrLf & "color:#9EACD9'>")

    'split File on 'margin-left:72
    xDat = Split(Dat, "<p style='margin-left:72.0pt;background:black'><span style='font-size:10.0pt;" & vbCrLf & "color:white'>")

    For i = 0 To UBound(xDat)
            If Left(xDat(i), 1) = "<" Then
        Else
            xDat(i) = Chr$(254) & xDat(i)
        End If
    Next
    Dat = Join(xDat, "<p style='margin-left:72.0pt;background:black'><span style='font-size:10.0pt;" & vbCrLf & "color:white'>")


    ff = FreeFile
    Open Application.CurrentProject.Path & "\K222KKTMA1.html" For Output As #ff
        Print #ff, Dat
    Close #ff

End Sub
Quite likely that's overkill but it works. I'm not familiar with the web browser control. If used can you read through the output and detect what each row is?
 

Isaac

Lifelong Learner
Local time
Today, 03:58
Joined
Mar 14, 2017
Messages
8,738

Note Tom's suggestion, which I agree with.
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Good to know I'm not the only one getting the error.
I'm hoping to read the data with Colins web browswer control, if I can figure it out.
 

isladogs

MVP / VIP
Local time
Today, 10:58
Joined
Jan 14, 2017
Messages
18,186
I've attached the file so you can play with it yourself.
Its VERY basic but it behaves like any browser window

In design view, you will need to change the control source of the browser control to the location of the html file

I also suggest you try and obtain the data in another format e.g. JSON, XML or CSV
 

Attachments

  • kirkm_html.zip
    31 KB · Views: 135

theDBguy

I’m here to help
Staff member
Local time
Today, 03:58
Joined
Oct 29, 2018
Messages
21,358
Hi dbGuy sure thing...
Hi. I finally got a chance to take a look at your file. It seems like you may have exported it from a Word document (that's what it looks like to me anyway). Just as a test (it probably won't work if you still have the problem with your Import Wizard), try importing the attached HTML file and let us know what happens.
 

Attachments

  • temp.zip
    404 bytes · Views: 134

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
Colin I got that result yesterday and was attempting to change the back color. It worked but not well (gave error 91)
I've now canned the idea of using Access. Too difficult ! And not enough info around to work out what's needed.
The indented rows needed to be read into a string and somehow detect what the indent was. I had the same kind of result dragging the filke into Excel - and the same issue of detecting the indents.
 

kirkm

Registered User.
Local time
Today, 23:58
Joined
Oct 30, 2008
Messages
1,257
DbGuy, may well have come from Word. Yes, I can open the html file and it creates a table called "temp" with 10 recorded and 4 fields.
But I've given up on Access and Word looks like it will do it e.g.
Code:
For i = 1 To 30
Debug.Print ActiveDocument.Paragraphs(i).Range.Text; ActiveDocument.Paragraphs(i).LeftIndent
Next
However it 's a devil of a job to find details of Word VBA commands. You donlt have a link to anything useful? I assueme there will be a Paragraphs count and some way to load a new doc, process that and repeat etc. I've got 145 to do whcih sould be a breeze once sorted - writing a file containing the text having identified what each row is.
 

Users who are viewing this thread

Top Bottom