abs file format

The abs workbook can be saved to a file on disk.  The file produced is an ASCII one (readable for human with any text editor) and the content of this file is a "Mircosoft Visual Basic" program.

When a file is opened in abs, a new workbook is created and the "main" routine of the program is executed.  You can edit this file to see how it works.

Data exchange between abs and Microsoft Excell

From abs to Excell

To export from 'abs' to Microsoft Excell, just load the file.abs inside the Visual Basic Editor of Excell and play the routine called 'main'

Note: if the 'main' routine is longer than 64 Kb, you will have to cut it in smaller parts due to a Mircosoft VB limitation.

From Excell to abs

To export from Microsoft Excell to abs, just play this macro inside Excell (An better update will be available soon):
'---------------------------------------------------------
'This Visual Basic routine played inside Microsoft Excell
'exports the Active Worksbook to the file 'c:\tmp\test.abs'
'
'This macro could be improved ...
'
'---------------------------------------------------------

Sub Export2abs()

Open "c:\tmp\test.abs" For Output As #1

'For i = 1 To 255

'Print #1, i; Chr(i)
'Next i

Print #1, "Sub main()"

For w = 1 To ActiveWorkbook.Worksheets.Count

Worksheets(w).Activate
If (w <= 3) Then
Print #1, "Worksheets(", w, ").Activate"
Else
Print #1, "Worksheets.Add"
Print #1, "Worksheets(", w, ").Activate"
End If

 Print #1, "Worksheets(", w, ").Name = "; Chr(34); Worksheets(w).Name; Chr(34)

For i = 1 To 100
 For j = 1 To 100
 
 abname = Cells(i, j).Formula
 
 If (Len(abname) > 0) Then
 If (Cells(i, j).HasFormula Or _
 Left(abname, 1) = "1" Or _
 Left(abname, 1) = "2" Or _
 Left(abname, 1) = "3" Or _
 Left(abname, 1) = "4" Or _
 Left(abname, 1) = "5" Or _
 Left(abname, 1) = "6" Or _
 Left(abname, 1) = "7" Or _
 Left(abname, 1) = "8" Or _
 Left(abname, 1) = "9" Or _
 Left(abname, 1) = "0" Or _
 Left(abname, 1) = "." _
                         ) Then
   Print #1, "Cells("; i; ","; j; ").Formula = "; Chr(34); abname; Chr(34)
   abname = Cells(i, j).NumberFormat
   Print #1, "Cells("; i; ","; j; ").NumberFormat = "; Chr(34); abname; Chr(34)
 Else
 
Print #1, "Cells("; i; ","; j; ").Formula = "; Chr(34); Chr(39); abname; Chr(34)
 End If
 
 'If (Cells(i, j).Font.Name = "Arial") Then
 '
 'End If
 
 If (Cells(i, j).Font.Bold = True) Then
 Print #1, "Cells("; i; ","; j; ").Font.Bold = True"
 End If
 
 End If
 
 Next j
 Next i
 
 Next w
 Print #1, "End Sub"
 Close #1
 
End Sub