亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? excel.inc

?? 一個可以讓powerbasic直接創建 Excel 的dll 模塊
?? INC
?? 第 1 頁 / 共 2 頁
字號:
'Excel.inc - Include file for BIFF 2.1 specifications to write Excel files.
'
'Converted from VB source to PowerBasic, November 2001.
'Paul Squires (2001) support@planetsquires.com (Freeware)
'
'Copyright (c) 2001 by Paul Squires.
'Although this code is available for free, the author retains the copyright, which means that you 
'cannot do anything with it that is not expressly allowed by the author. In general terms, the author
'would allow the programmer to incorporate the code into their applications. Selling the code by 
'itself is prohibited. 
'
'
'Class file for writing Microsoft Excel BIFF 2.1 files.
'
'This class is intended for users who do not want to use the huge
'Jet or ADO providers if they only want to export their data to
'an Excel compatible file.

'Newer versions of Excel use the OLE Structure Storage methods
'which are quite complicated.

'Paul Squires, November 10, 2001
'support@planetsquires.com


'constants to hold cell alignment
    %xlsGeneralAlign = 0
    %xlsLeftAlign = 1
    %xlsCentreAlign = 2
    %xlsRightAlign = 3
    %xlsFillCell = 4
    %xlsLeftBorder = 8
    %xlsRightBorder = 16
    %xlsTopBorder = 32
    %xlsBottomBorder = 64
    %xlsShaded = 128

'constants to handle selecting the font for the cell
    'used by rgbAttr2
    'bits 0-5 handle the *picture* formatting, not bold/underline etc...
    'bits 6-7 handle the font number
    %xlsFont0 = 0
    %xlsFont1 = 64
    %xlsFont2 = 128
    %xlsFont3 = 192

    'used by rgbAttr1
    'bits 0-5 must be zero
    'bit 6 locked/unlocked
    'bit 7 hidden/not hidden
    %xlsCellNormal = 0
    %xlsCellLocked = 64
    %xlsCellHidden = 128


'set up variables to hold the spreadsheet's layout
    %xlsLeftMargin = 38
    %xlsRightMargin = 39
    %xlsTopMargin = 40
    %xlsBottomMargin = 41


   'add these enums together. For example: xlsBold + xlsUnderline
   %xlsNoFormat = 0
   %xlsBold = 1
   %xlsItalic = 2
   %xlsUnderline = 4
   %xlsStrikeout = 8


Type FONT_RECORD
   opcode As Integer  '49
   length As Integer  '5+len(fontname)
   FontHeight As Integer
   
   'bit0 bold, bit1 italic, bit2 underline, bit3 strikeout, bit4-7 reserved
   FontAttributes1 As Byte
   FontAttributes2 As Byte  'reserved - always 0
   FontNameLength As Byte
End Type


Type PASSWORD_RECORD
   opcode As Integer  '47
   length As Integer  'len(password)
End Type


Type HEADER_FOOTER_RECORD
   opcode As Integer  '20 Header, 21 Footer
   length As Integer  '1+len(text)
   TextLength As Byte
End Type


Type PROTECT_SPREADSHEET_RECORD
   opcode As Integer  '18
   length As Integer  '2
   Protect As Integer
End Type

Type FORMAT_COUNT_RECORD
   opcode As Integer  '1f
   length As Integer '2
   Count As Integer
End Type

Type FORMAT_RECORD
   opcode As Integer  '1e
   length As Integer  '1+len(format)
   FormatLength As Byte 'len(format)
End Type '+ followed by the Format-Picture

Type COLWIDTH_RECORD
   opcode As Integer  '36
   length As Integer  '4
   col1 As Byte       'first column
   col2 As Byte       'last column
   ColumnWidth As Integer   'at 1/256th of a character
End Type

'Beginning Of File record
Type BEG_FILE_RECORD
  opcode As Integer
  length As Integer
  version As Integer
  ftype As Integer
End Type

'End Of File record
Type END_FILE_RECORD
  opcode As Integer
  length As Integer
End Type

'true/false to print gridlines
Type PRINT_GRIDLINES_RECORD
  opcode As Integer
  length As Integer
  PrintFlag As Integer
End Type

'Integer record
Type tInteger
  opcode As Integer
  length As Integer
  Row As Integer     'unsigned integer
  col As Integer
  
  'rgbAttr1 handles whether cell is hidden and/or locked
  rgbAttr1 As Byte
  
  'rgbAttr2 handles the Font# and Formatting assigned to this cell
  rgbAttr2 As Byte
  
  'rgbAttr3 handles the Cell Alignment/borders/shading
  rgbAttr3 As Byte
  
  intValue As Integer  'the actual integer value
End Type

'Number record
Type tNumber
  opcode As Integer
  length As Integer
  Row As Integer
  col As Integer
  rgbAttr1 As Byte
  rgbAttr2 As Byte
  rgbAttr3 As Byte
  NumberValue As Double  '8 Bytes
End Type

'Label (Text) record
Type tText
  opcode As Integer
  length As Integer
  Row As Integer
  col As Integer
  rgbAttr1 As Byte
  rgbAttr2 As Byte
  rgbAttr3 As Byte
  TextLength As Byte
End Type

Type MARGIN_RECORD_LAYOUT
  opcode As Integer
  length As Integer
  MarginValue As Double  '8 bytes
End Type

Type HPAGE_BREAK_RECORD
  opcode As Integer
  length As Integer
  NumPageBreaks As Integer
End Type

Type DEF_ROWHEIGHT_RECORD
  opcode As Integer
  length As Integer
  RowHeight As Integer
End Type

Type ROW_HEIGHT_RECORD
  opcode As Integer  '08
  length As Integer  'should always be 16 bytes
  RowNumber As Integer
  FirstColumn As Integer
  LastColumn As Integer
  RowHeight As Integer  'written to file as 1/20ths of a point
  internal As Integer
  DefaultAttributes As Byte  'set to zero for no default attributes
  FileOffset As Integer
  rgbAttr1 As Byte
  rgbAttr2 As Byte
  rgbAttr3 As Byte
End Type

Global xlsFileNumber As Long
Global xlsBufferSize As Long  'if > 0 then buffer is active, also holds size of buffer.
Global xlsBufferString As String


'create an array that will hold the rows where a horizontal page
'break will be inserted just before.
Global xlsHorizPageBreakRows() As Long
Global xlsNumHorizPageBreaks As Long


Declare Function xlsCreateFile(mFileName$) As Long
Declare Function xlsCloseFile() As Long
Declare Function xlsInsertHorizPageBreak(ByVal lrow As Long) As Long
Declare Function xlsWriteInteger(ByVal value%, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long
Declare Function xlsWriteNumber(ByVal value#, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long
Declare Function xlsWriteText(value$, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long
Declare Function xlsWriteDate(DateString$, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long
Declare Function xlsSetMargin(ByVal Margin&, ByVal MarginValue#) As Long
Declare Function xlsSetColumnWidth(ByVal FirstColumn&, ByVal LastColumn&, ByVal WidthValue&) As Long
Declare Function xlsSetFont(FontName$, ByVal FontHeight&, ByVal FontFormat&) As Long
Declare Function xlsSetHeader(HeaderText$) As Long
Declare Function xlsSetFooter(FooterText$) As Long
Declare Function xlsSetFilePassword(PasswordText$) As Long
Declare Function xlsPrintGridLines(ByVal TrueFalse&) As Long
Declare Function xlsProtectSpreadsheet(ByVal TrueFalse&) As Long
Declare Function xlsWriteDefaultFormats() As Long
Declare Function xlsSetDefaultRowHeight(ByVal HeightValue&) As Long
Declare Function xlsSetRowHeight(ByVal lrow&, ByVal HeightValue&) As Long
Declare Function ConvertRow(ByVal lrow As Long) As Integer
Declare Function ConvertCol(ByVal lcol As Long) As Integer
Declare Function DateToJulian&(DateString$) As Long
Declare Function CTOD(PBDate As String) As String
Declare Function xlsBuffer(ByVal TrueFalse&, ByVal BufferSize&) As Long
Declare Function UpdateBuffer(BufferString$) As Long



Function xlsCreateFile(mFileName$) As Long

    If Dir$(mFileName$) > "" Then
       Kill mFileName$
       If ErrClear Then 
          Function = -1
          Exit Function
       End If   
    End If
    
    Dim BEG_FILE_MARKER As BEG_FILE_RECORD
    'beginning of file
    BEG_FILE_MARKER.opcode = 9
    BEG_FILE_MARKER.length = 4
    BEG_FILE_MARKER.version = 2
    BEG_FILE_MARKER.ftype = 10
        
    xlsFileNumber = FreeFile
    Open mFileName$ For Binary As #xlsFileNumber
    
    'if the buffer us active then save the data to the buffer
    'otherwise then simply write to the file.
    If xlsBufferSize Then
        stat& = UpdateBuffer((BEG_FILE_MARKER))
    Else
        Put #xlsFileNumber, , BEG_FILE_MARKER  'must always be written first
        If ErrClear Then 
           Function = -1
           Exit Function
        End If   
    End If
        
    'write the default formats to the file
    'and return if error occured.
    If xlsWriteDefaultFormats Then Exit Function
    
    'create the Horizontal Page Break array
    ReDim xlsHorizPageBreakRows(0)
    xlsNumHorizPageBreaks = 0
    
    Function = 0  'return with no error
    
End Function



Function xlsCloseFile() As Long

    If xlsFileNumber = 0 Then 
       Function = -1
       Exit Function
    End If   
    
    'write the horizontal page breaks if necessary
    If xlsNumHorizPageBreaks > 0 Then
       'the Horizontal Page Break array must be in sorted order.
       'Use a simple Bubble sort because the size of this array would
       'be pretty small most of the time. A QuickSort would probably
       'be overkill.
         Dim lLoop1 As Long
         Dim lLoop2 As Long
         Dim lTemp As Long
         For lLoop1 = UBound(xlsHorizPageBreakRows) To LBound(xlsHorizPageBreakRows) Step -1
           For lLoop2 = LBound(xlsHorizPageBreakRows) + 1 To lLoop1
             If xlsHorizPageBreakRows(lLoop2 - 1) > xlsHorizPageBreakRows(lLoop2) Then
               lTemp = xlsHorizPageBreakRows(lLoop2 - 1)
               xlsHorizPageBreakRows(lLoop2 - 1) = xlsHorizPageBreakRows(lLoop2)
               xlsHorizPageBreakRows(lLoop2) = lTemp
             End If
           Next lLoop2
         Next lLoop1
              
       'write the Horizontal Page Break Record
        Dim HORIZ_PAGE_BREAK As HPAGE_BREAK_RECORD
        HORIZ_PAGE_BREAK.opcode = 27
        HORIZ_PAGE_BREAK.length = 2 + (xlsNumHorizPageBreaks * 2)
        HORIZ_PAGE_BREAK.NumPageBreaks = xlsNumHorizPageBreaks

        If xlsBufferSize Then
            stat& = UpdateBuffer((HORIZ_PAGE_BREAK))
        Else
            Put #xlsFileNumber, , HORIZ_PAGE_BREAK
            If ErrClear Then 
               Function = -1
               Exit Function
            End If   
        End If    
        
        'now write the actual page break values
        For x& = 1 To UBound(xlsHorizPageBreakRows)
           st$ = Mki$(xlsHorizPageBreakRows(x&))
           If xlsBufferSize Then
               stat& = UpdateBuffer(st$)
           Else
               Put #xlsFileNumber, , st$
               If ErrClear Then 
                  Function = -1
                  Exit Function
               End If   
           End If    
        Next
    End If
     
    Dim END_FILE_MARKER As END_FILE_RECORD
    'end of file marker
    END_FILE_MARKER.opcode = 10
    
    If xlsBufferSize Then
        'set xlsBufferSize to -1 which will flag the UpdateBuffer routine
        'to flush the buffer.
        xlsBufferSize = -1
        stat& = UpdateBuffer("")
    End If
        
    Put #xlsFileNumber, , END_FILE_MARKER

    Close #xlsFileNumber

    Function = 0  'return with no error code
    
End Function



Function xlsInsertHorizPageBreak(ByVal lrow As Long) As Long

'the row and column values are written to the excel file as
'unsigned integers. Therefore, must convert the longs to integer.
    If lrow > 32767 Then
       Row% = CInt(lrow - 65536)
    Else
       Row% = CInt(lrow) - 1    'rows/cols in Excel binary file are zero based
    End If
        
    xlsNumHorizPageBreaks = xlsNumHorizPageBreaks + 1
    ReDim Preserve xlsHorizPageBreakRows(xlsNumHorizPageBreaks)
    
    xlsHorizPageBreakRows(xlsNumHorizPageBreaks) = Row%
    
    Function = 0

End Function



Function ConvertRow(ByVal lrow As Long) As Integer
'the row and column values are written to the excel file as
'integers. Therefore, must convert the longs to integer.
    
    If lrow > 32767 Then
       Function = CInt(lrow - 65536)
    Else
       Function = CInt(lrow) - 1    'rows/cols in Excel binary file are zero based
    End If
  
End Function


Function ConvertCol(ByVal lcol As Long) As Integer
'the row and column values are written to the excel file as
'integers. Therefore, must convert the longs to integer.

    If lcol > 32767 Then
       Function = CInt(lcol - 65536)
    Else
       Function = CInt(lcol) - 1    'rows/cols in Excel binary file are zero based
    End If

End Function




Function xlsWriteInteger(ByVal value%, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long

    'convert the row, col from LONG to INTEGER.
    Row% = ConvertRow(lrow&)
    Col% = ConvertCol(lcol&)
    
    Dim INTEGER_RECORD As tInteger
    INTEGER_RECORD.opcode = 2
    INTEGER_RECORD.length = 9
    INTEGER_RECORD.Row = Row%
    INTEGER_RECORD.col = col%
    INTEGER_RECORD.rgbAttr1 = CByt(HiddenLocked&)
    INTEGER_RECORD.rgbAttr2 = CByt(CellFont& + CellFormat&)
    INTEGER_RECORD.rgbAttr3 = CByt(CellAlignment&)
    INTEGER_RECORD.intValue = value%

    If xlsBufferSize Then
       stat& = UpdateBuffer((INTEGER_RECORD))    
    Else
       Put #xlsFileNumber, , INTEGER_RECORD
       If ErrClear Then 
          Function = -1
          Exit Function
       End If   
    End If   

    Function = 0   'return with no error
    
End Function



Function xlsWriteNumber(ByVal value#, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long

    'convert the row, col from LONG to INTEGER.
    Row% = ConvertRow(lrow&)
    Col% = ConvertCol(lcol&)

    Dim NUMBER_RECORD As tNumber
    NUMBER_RECORD.opcode = 3
    NUMBER_RECORD.length = 15
    NUMBER_RECORD.Row = Row%
    NUMBER_RECORD.col = col%
    NUMBER_RECORD.rgbAttr1 = CByt(HiddenLocked&)
    NUMBER_RECORD.rgbAttr2 = CByt(CellFont& + CellFormat&)
    NUMBER_RECORD.rgbAttr3 = CByt(CellAlignment&)
    NUMBER_RECORD.NumberValue = value#

    If xlsBufferSize Then
       stat& = UpdateBuffer((NUMBER_RECORD))    
    Else
       Put #xlsFileNumber, , NUMBER_RECORD
       If ErrClear Then 
          Function = -1
          Exit Function
       End If   
    End If   

    Function = 0   'return with no error
    
End Function


Function xlsWriteText(value$, ByVal lrow&, ByVal lcol&, ByVal CellFont&, ByVal CellAlignment&, ByVal HiddenLocked&, ByVal CellFormat&) As Long

    'convert the row, col from LONG to INTEGER.
    Row% = ConvertRow(lrow&)
    Col% = ConvertCol(lcol&)

    Dim b As Byte
    st$ = value$
    l& = Len(st$)
    
    Dim TEXT_RECORD As tText
    TEXT_RECORD.opcode = 4
    TEXT_RECORD.length = 10
    'Length of the text portion of the record
    TEXT_RECORD.TextLength = l&
    
    'Total length of the record
    TEXT_RECORD.length = 8 + l&
    
    TEXT_RECORD.Row = Row%
    TEXT_RECORD.col = col%
      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产91久久久久| 欧美性猛片xxxx免费看久爱| 成人免费看视频| 91成人在线免费观看| 久久尤物电影视频在线观看| 一区二区在线观看视频在线观看| 91亚洲精品久久久蜜桃网站| 欧美卡1卡2卡| 亚洲图片你懂的| 狠狠网亚洲精品| 欧美精品高清视频| 亚洲精品国产精华液| 一区二区激情视频| 成人精品视频一区二区三区| 欧美成人女星排名| 偷窥少妇高潮呻吟av久久免费| 成人av影视在线观看| 26uuu久久天堂性欧美| 亚洲高清免费观看 | 亚洲另类春色校园小说| 国产在线精品一区在线观看麻豆| 欧美三区在线视频| 亚洲欧美另类图片小说| 成人av动漫在线| 久久久五月婷婷| 国产在线不卡一区| www精品美女久久久tv| 久久成人免费日本黄色| 91精品国产色综合久久ai换脸| 亚洲综合一区二区精品导航| 波多野结衣中文字幕一区二区三区| 亚洲精品一区二区三区蜜桃下载 | 国产精品国产三级国产普通话99 | 高清不卡在线观看| 337p日本欧洲亚洲大胆色噜噜| 日韩av在线发布| 欧美一区二区三区人| 日韩一区精品视频| 69久久99精品久久久久婷婷| 午夜免费久久看| 欧美一区二区在线播放| 奇米在线7777在线精品| 欧美精品一二三四| 免费成人美女在线观看.| 精品少妇一区二区三区日产乱码| 美国欧美日韩国产在线播放| 精品日韩成人av| 国产精品18久久久久久久久| 国产香蕉久久精品综合网| 国产91色综合久久免费分享| 国产精品欧美一级免费| 94-欧美-setu| 亚洲国产精品久久艾草纯爱| 欧美日韩一二区| 免费观看在线色综合| 欧美电视剧在线看免费| 国产成人在线色| 国产成人午夜视频| 国产精品国产自产拍在线| 色偷偷88欧美精品久久久| 午夜精品一区二区三区免费视频| 91精品欧美久久久久久动漫| 国产一级精品在线| 亚洲男人的天堂在线aⅴ视频| 欧美午夜精品久久久久久超碰| 免费成人性网站| 国产精品久久久久久久久久久免费看 | 欧美日本视频在线| 精品一区二区三区视频在线观看| 欧美韩国日本一区| 欧美日韩激情一区| 国产一区二区三区观看| 亚洲欧美视频在线观看视频| 日韩一级片在线观看| 99精品热视频| 蜜桃av一区二区三区电影| 国产精品久久久久桃色tv| 欧美精品久久久久久久久老牛影院| 国产精品影音先锋| 午夜久久电影网| 国产精品久久久99| 日韩一区二区在线播放| 91女厕偷拍女厕偷拍高清| 久久精品av麻豆的观看方式| 亚洲精品伦理在线| 久久蜜桃av一区精品变态类天堂| 色欧美片视频在线观看| 国产精品影视在线| 免费精品99久久国产综合精品| 亚洲欧洲日产国码二区| 精品国精品国产尤物美女| 在线观看日韩高清av| 不卡av免费在线观看| 精品一区二区国语对白| 午夜精品免费在线观看| 中文字幕亚洲区| 国产亚洲精品aa午夜观看| 91精品国产一区二区人妖| 色婷婷久久综合| 成人激情校园春色| 国产一区二区网址| 免费在线观看成人| 五月天亚洲婷婷| 亚洲无人区一区| 一区二区欧美视频| 亚洲精品中文字幕在线观看| 国产精品国产a| 亚洲国产高清在线| 久久久久久久综合狠狠综合| 欧美tk—视频vk| 欧美成人a视频| 欧美成人乱码一区二区三区| 日韩一区二区三区观看| 欧美日本不卡视频| 欧美猛男超大videosgay| 欧美视频一区在线| 欧美网站一区二区| 欧美视频一区二| 欧美日韩卡一卡二| 欧美一区二区三区日韩视频| 91精品国产综合久久久蜜臀粉嫩 | 97久久精品人人做人人爽50路| 国产不卡在线视频| 国产成人精品一区二区三区四区 | 精品一区免费av| 极品少妇一区二区| 国产一区亚洲一区| 成人免费视频播放| 色综合久久中文综合久久97| 在线观看视频91| 91麻豆精品国产91久久久 | 欧美三级在线视频| 欧美一区二区免费视频| 欧美一区永久视频免费观看| 日韩欧美色电影| 久久久精品免费免费| 中文字幕巨乱亚洲| 亚洲人精品一区| 日韩国产欧美在线视频| 精品午夜一区二区三区在线观看| 国产一二三精品| 色婷婷精品大在线视频| 欧美三日本三级三级在线播放| 欧美精品久久一区二区三区| 久久综合99re88久久爱| 中文字幕一区二区三区色视频| 亚洲影视在线观看| 久久99久久99| 91一区二区在线| 欧美一区二区美女| 国产精品丝袜久久久久久app| 亚洲综合在线电影| 久久成人18免费观看| av在线播放一区二区三区| 欧美日韩第一区日日骚| 久久久久久久久久久久久久久99| 一区二区在线免费| 精品中文字幕一区二区| 91丨九色丨尤物| 欧美va在线播放| 亚洲主播在线观看| 国产成人在线观看| 欧美一区二区观看视频| 综合久久久久综合| 狠狠色丁香九九婷婷综合五月| 91蜜桃免费观看视频| 精品成a人在线观看| 亚洲蜜桃精久久久久久久| 久久精品av麻豆的观看方式| 在线观看日产精品| 中文字幕精品三区| 美女一区二区视频| 欧美在线免费视屏| 国产精品久久二区二区| 久久er99热精品一区二区| 在线看日本不卡| 国产精品久久久久国产精品日日 | 国产成人精品综合在线观看| 欧美精品精品一区| 一区二区三区欧美激情| 丰满少妇在线播放bd日韩电影| 日韩亚洲电影在线| 亚洲黄色小视频| 91网站在线播放| 国产精品久久国产精麻豆99网站| 另类小说图片综合网| 欧美日韩国产首页| 一区二区不卡在线播放 | 欧美日韩国产一区| 亚洲精品伦理在线| 91在线视频网址| 中文字幕一区二区三区乱码在线| 国产高清视频一区| 久久综合久久综合久久| 精品一区免费av| xf在线a精品一区二区视频网站| 麻豆91精品视频| 日韩小视频在线观看专区| 秋霞av亚洲一区二区三| 欧美一级理论片|