Category : Lotus and other Spreadsheets
Archive   : LTSTIPS2.ZIP
Filename : INSID123.BAS

 
Output of file : INSID123.BAS contained in archive : LTSTIPS2.ZIP
ÿ#
:ÙINSIDE.BAS: A program to print data in a (Lotus 1-2-3) worksheet file.k :ÙFor an explanation of the program and its purposes, see the file„ :Ùlabeled INSID123.˜:ÙMain program±2 x :ÙOpen fileÃ<RECORDTYPE%çÙF±é RECORDTYPE%èæP Ò :ÙRead and process a recordZ²d:x:ÙProcedure to open the worksheet fileZ‚… "Worksheet name ";FLNAME$uŒFLNAME$çFLNAME$é".wks"Ž–º FLNAME$ AS 1 ÿ’瀦 þ‚ #,€ AS BUFFER$°ªþ‰ #¿´POINTER%瞎óÒ:ÙProcedure to read and process a record܍ r :ÙRead record type and lengthNæ:ÙGo to appropriate routine for processingtð‹ RECORDTYPE%ç ‰ ò :ÙHeader™ú‹ RECORDTYPE%ç ‰ ` :ÙRangeÆ‹ RECORDTYPE%ç
‰ < :ÙInteger valueü‹ RECORDTYPE%ç ‰ – :ÙDouble precision value4‹ RECORDTYPE%ç ‰  :ÙCharacter string (label)e"‹ RECORDTYPE%ç ‰ r :ÙFormula and value•,‹ RECORDTYPE%ç ‰  :ÙEnd of worksheetÑ6:ÙNot a type to be processed -- read remaining portionì@‚ I%ç Ì RECORDLENGTH% J à :ÙGet the next byteTƒ I%^ŽUr:ÙProcedure to get the type and length of the recordl|:ÙGet record typev† à€ ਚRECORDTYPE%çý(PREVIOUSBYTE$éBYTE$)Á¤:ÙGet record lengthË® àÕ¸ àÿÂRECORDLENGTH%çý(PREVIOUSBYTE$éBYTE$)ÌŽ+à:ÙProcedure to get the next byteCêPREVIOUSBYTE$çBYTE$dôBYTE$çÿƒ(BUFFER$,POINTER%,)|þPOINTER%çPOINTER%锋(POINTER%èç€) Í Žžþ‰ #­POINTER%ç³&Žô::ÙProcedure to get format, row and column for a data recordþD àNFORMATBYTE$çBYTE$X à(b àLlCOLUMN%çý(PREVIOUSBYTE$éBYTE$)Vv à`€ àŠROW%çý(PREVIOUSBYTE$éBYTE$)‡”Ž¯¨:ÙProcedure to print cell locationÞ²:ÙConvert column to alphabetic charactersô¼CHAR1%çCOLUMN%ô ÆCHAR2%çCOLUMN% ó @Ћ CHAR1%ç Í ALPHA$ç" " :¡ ALPHA$çÿ–(@éCHAR1%)`ÚALPHA$çALPHA$éÿ–(AéCHAR2%)|ä:ÙPrint column and row‘î‘ ALPHA$;ROW%é;—øŽË :ÙProcedure to convert double precision numberã:ÙTest for NA code ‹ ((BYT%()çÿ) î (BYT%()çð)) Í ISNA%ç :¡ ISNA%ç.*‹ ISNA%ç Í ŽC4:ÙTest for zerou>‹ (BYT%()ç) î (BYT%()ç) Í DOUBLE#ç:Ž…H:ÙGet sign´R‹ ((BYT%() î €)æ) Í SIGN%çê :¡ SIGN%çÈ\:ÙGet exponentáfBYT%()çBYT%() î pBYT2LEFT%ç(BYT%() î ð)ôzBYT2RIGHT%çBYT%() î D„EXPONENT%çBYT%()ëéBYT2LEFT%êÿXŽ:ÙGet mantissac˜SUM#çw¢‚ I%ç Ì  Ï ê”¬SUM#ç(SUM#éBYT%(I%))읶ƒ I%ÊÀSIGNIFICAND#çé(BYTWRIGHT%ì)é(SUM#ì)ßÊ:ÙCompute valueÔDOUBLE#çSIGN%ë(SIGNIFICAND#ë(íEXPONENT%))ÞŽIò:ÙProcedure to process a header record (type 0)hü‹ RECORDLENGTH%èæ Í ‰ Br à‹ BYTE$èæÿ–() Í ‰ B— à²$‹ BYTE$èæÿ–() Í ‰ B¸.ŽØ8:ÙError -- halt processingB‘ "ERROR -- Not a Valid Worksheet File"
L>`:ÙProcedure to process a range record (type 6)kj:ÙFind range from which data were savedut à~ ईFROMCOL%çý(PREVIOUSBYTE$éBYTE$)®’ ผ àݦFROMROW%çý(PREVIOUSBYTE$éBYTE$)簍 àñº àÄTOCOL%çý(PREVIOUSBYTE$éBYTE$)΍ à(؍ àKâTOROW%çý(PREVIOUSBYTE$éBYTE$)jì:ÙFind lower right cornerƒöROW%çTOROW%êFROMROW%ŸCOLUMN%çTOCOL%êFROMCOL%½
‘ "Lower Right Corner: ";à ¨ :ÙPrint cell locationæ‘ì(Ž$<:ÙProcedure to process an integer record (type 13)NF : :ÙGet format, row and columnqP ¨ :ÙPrint cell location{Z à…d à¨nVALUE%çý(PREVIOUSBYTE$éBYTE$)ºx‘ Î); VALUE%À‚Ž –:ÙProcedure to process a double precision value record (type 14)0   : :ÙGet format, row and columnS ª ¨ :ÙPrint cell locationb ´‚ I%ç Ì l ¾ à… ÈBYT%(êI%)çÿ•(BYTE$)Ž Òƒ I%à ܍   :ÙConvert to a double-precision numberð æ‹ ISNA%ç Í ‘ Î); "NA" :¡ ‘ Î);DOUBLE#ö ðŽ6!:ÙProcedure to process a character string record (type 15)a! : :ÙGet format, row and column…! ¨ :ÙPrint cell location˜!"CHARSTRING$ç""·!,‚ I%ç Ì (RECORDLENGTH%ê)Á!6 àã!@CHARSTRING$çCHARSTRING$éBYTE$ì!Jƒ I%"T‘ Î);CHARSTRING$"^Ž?"r:ÙProcedure to process a formula record (type 16)j"| : :ÙGet format, row and columnŽ"† ¨ :ÙPrint cell location"‚ I%ç Ì §"š àÀ"¤BYT%(êI%)çÿ•(BYTE$)É"®ƒ I%ý"¸   :ÙConvert to a double-precision number)#‹ ISNA%ç Í ‘ Î);"NA" :¡ ‘ Î);DOUBLE#H#Ì:ÙRead past formula bytesh#Ö‚ I%ç Ì (RECORDLENGTH%ê
)r#à à{#êƒ I%#ôŽÁ#:ÙProcedure to process an end-of-worksheet record (type 1)ß#‘ "End of Worksheet File"å#Ž

  3 Responses to “Category : Lotus and other Spreadsheets
Archive   : LTSTIPS2.ZIP
Filename : INSID123.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/