PDA

View Full Version : how to read html file using vbscript and write it into an excel



sravs448
March 15th, 2013, 10:08 PM
Hi,
I want read a html and write few columns from it into an excel table.
I am currently using a macro to do it. But need it in VBScript

Below given is the sample html.
I want to count the number of fail occurrences for complainace check and oracle table and write it into an excel.

HTML File:



Result
Detail
Time


INFO
TEST STARTED

2/9/2012 4:53:30 AM


DONE
Passed -he webservice call.
2/9/2012 4:53:34 AM


FAIL

Failed on compliance check,
2/9/2012 4:55:22 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:33 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:36 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:37 AM


WARNING
Error querying QA-ORA.

2/9/2012 4:55:38 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:39 AM


DONE
Passed - the trade was found in the SybaseFund table.
2/9/2012 4:55:42 AM


FAIL

Failed - not found in the Oracletable.
2/9/2012 4:55:42 AM


FAIL

Failed - not found in the Oracle table.





Desired Result in Excel:





ComplianceCheck
Oracle


2/9/2012
1
2


2/3/2013
0
0

sravs448
March 15th, 2013, 10:26 PM
Hi,
I want read a html and write few columns from it into an excel table.
I am currently using a macro to do it. But need it in VBScript

Below given is the sample html.
I want to count the number of fail occurrences for complainace check and oracle table and write it into an excel.

HTML File:



Result
Detail
Time


INFO
TEST STARTED
2/9/2012 4:53:30 AM


DONE
Passed -he webservice call.
2/9/2012 4:53:34 AM


FAIL

Failed on compliance check,
2/9/2012 4:55:22 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:33 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:36 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:37 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:38 AM


WARNING
Error querying QA-ORA.
2/9/2012 4:55:39 AM


DONE
Passed - the trade was found in the SybaseFund table.
2/9/2012 4:55:42 AM


FAIL

Failed - not found in the Oracletable.
2/9/2012 4:55:42 AM


FAIL

Failed - not found in the Oracle table.





Desired Result in Excel:





ComplianceCheck
Oracle


2/9/2012
1
2


2/3/2013
0
0

DuckHook
March 15th, 2013, 11:06 PM
I don't mean to be unfriendly, but why on earth are you posting in a Linux forum? Wouldn't a Windows forum better suit your needs?

trent.josephsen
March 16th, 2013, 12:17 AM
I have done stuff like this in Perl, but have no VBScript experience (and plan to keep it that way). You may wish to ask at Daniweb or Stack Overflow, where you'd be likely to find more VBScript experience than here at UF.

That said, if you post the code you're working on it's still possible someone here can help you fix it. You do have some code, right?

Sef
March 16th, 2013, 03:13 AM
Merged threads. Please do not cross post. Thank you.

ofnuts
March 16th, 2013, 10:22 PM
You do have some code, right?

*cough*