&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&
&&&&&&& HTML to Excel Converter
&&&&&&&
&&&&&&& Does not have any logic regarding
&&&&&&& more than 254 Columns or worksheets
&&&&&&& nor over 65K Rows.
&&&&&&&
&&&&&&& Copy and paste into a .PRG!
&&&&&&&
&&&&&&& Brian Altman
&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&
&&&&&&& Built using VFP 7 and Office 2000
&&&&&&& May not work on pre-VFP 7 Systems
&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
Height = 296
Width = 594
AutoCenter = .T.
Caption = "HTMLs to Excel Workbook Converter"
Name = "Form1"
ADD OBJECT text1 AS textbox WITH ;
Height = 25, ;
Left = 24, ;
Top = 24, ;
Width = 432, ;
Name = "Text1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 24, ;
Left = 468, ;
Height = 25, ;
Width = 120, ;
Caption = "Get Directory", ;
Name = "Command1"
ADD OBJECT command2 AS commandbutton WITH ;
Top = 240, ;
Left = 336, ;
Height = 37, ;
Width = 120, ;
Caption = "Convert to XL", ;
Visible = .F., ;
Name = "Command2"
ADD OBJECT text2 AS textbox WITH ;
Height = 25, ;
Left = 24, ;
Top = 60, ;
Width = 96, ;
Name = "Text2"
ADD OBJECT list1 AS listbox WITH ;
RowSourceType = 0, ;
RowSource = "", ;
ControlSource = "", ;
Height = 132, ;
Left = 24, ;
Top = 96, ;
Visible = .F., ;
Width = 252, ;
Name = "List1"
ADD OBJECT list2 AS listbox WITH ;
Height = 132, ;
Left = 324, ;
Top = 96, ;
Visible = .F., ;
Width = 253, ;
Name = "List2"
ADD OBJECT command3 AS commandbutton WITH ;
Top = 132, ;
Left = 288, ;
Height = 25, ;
Width = 25, ;
Caption = ">", ;
Visible = .F., ;
Name = "Command3"
ADD OBJECT command4 AS commandbutton WITH ;
Top = 168, ;
Left = 288, ;
Height = 25, ;
Width = 25, ;
Caption = "<", ;
Visible = .F., ;
Name = "Command4"
ADD OBJECT command5 AS commandbutton WITH ;
Top = 96, ;
Left = 288, ;
Height = 25, ;
Width = 25, ;
Caption = ">>", ;
Visible = .F., ;
Name = "Command5"
ADD OBJECT command6 AS commandbutton WITH ;
Top = 204, ;
Left = 288, ;
Height = 25, ;
Width = 25, ;
Caption = "<<", ;
Visible = .F., ;
Name = "Command6"
FOR i = 1 TO arraycount
IF lower(alltr(harray(i,1)))#"tables2htm.htm" AND "."+LOWER(JUSTEXT(alltr(harray(i,1))))==LOWER(ALLTRIM(thisform.text2.value))
thisform.list1.AddListItem(harray(i,1),i)
ENDIF
ENDFOR
ENDIF
thisform.list1.refresh
IF thisform.list1.ListCount=0
messagebox("No files with that extension were found","Try Again",0)
ENDIF
ENDPROC
IF thisform.list2.ListCount=0
messagebox("No files Selected","Try Again",0)
RETURN
ENDIF
&&start testing
IF DIRECTORY(cdir+"\tables2htm_files")=.f.
MKDIR (cdir+"\tables2htm_files")
ELSE
SET DEFAULT TO (cdir+"\tables2htm_files")
FOR x=1 TO ADIR(temparray,&exttype4array)
ERASE temparray(x,1)
ENDFOR
SET DEFAULT TO &cdir
ENDIF
For workbookcount= 1 TO thisform.list2.ListCount
inputfile=ALLTRIM(thisform.text1.Value)+ALLTRIM(thisform.list2.listitem(workbookcount,1))
COPY FILE &inputfile TO (cdir+"\tables2htm_files\"+ALLTRIM(thisform.list2.listitem(workbookcount,1)))
ENDFOR
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.