VSFlexGrid导出EXCEL后,在本机上数据的排版和预览的一样,但是在同事的机子上就出现怪事,很多行与行间插入了许多合并的空白行,请问其他朋友有没有碰到这样的问题,如何解决?

解决方案 »

  1.   

    VSFlexGrid1.SaveGrid "c:\filename.xls", flexFileExcel, 1
    下面是有关savegrid的帮助说明.SaveGrid MethodSaves grid contents and format to a file.
    Syntax     
    [form!]VSFlexGrid.SaveGrid FileName As String, SaveWhat As SaveLoadSettings, [ FixedCells As Boolean ]
    Res    
    This method saves a grid to a binary or to a text file. The grid may be retrieved later with the LoadGrid method. Grids saved to text files may also be read by other programs, such as Microsoft Excel or Microsoft Word.The parameters for the SaveGrid method are described below:FileName As String
    The name of the file to create, including the path. If a file with the same name already exists, it is overwritten.SaveWhat As SaveLoadSettings
    This parameter specifies what should be saved. Valid options are:Constant Value Description
    flexFileAll 0 Save all data and formatting information.
    flexFileData 1 Save only the data, ignoring formatting information.
    flexFileFormat 2 Save only the global formatting, ignoring the data.
    flexFileCommaText 3 Save data to a comma-delimited text file.
    flexFileTabText 4 Save data to a tab-delimited text file.
    flexFileCustomText 5 Save data to a text file using the delimiters specified by the ClipSeparators property.
    FixedCells As Variant  (optional)
    If this parameter is set to False (the default), then values in fixed cells are not saved to text files -- only the scrollable part of the grid is saved. If this parameter is set to True, then fixed rows and columns are also saved.The flexFileFormat option saves global formatting only. It does not save any cell-specific information, not even the number of rows and columns. This allows you to use this setting to create formats that can be applied to existing grids even if they have different dimensions. Because column widths and row heights are related to the number of rows and columns on the grid, they are not saved or restored if you use the flexFileFormat option.The following is a list of the properties that do get saved and restored if you use the flexFileFormat option: BackColor, ForeColor, BackColorBkg, BackColorAlternate, BackColorFixed, ForeColorFixed, BackColorSel, ForeColorSel, TreeColor, SheetBorder, GridLines, GridLinesFixed, GridLineWidth, GridColor, GridColorFixed, TextStyle, TextStyleFixed, ScrollBars, SelectionMode, RowHeightMin, MergeCells, SubtotalPosition, OutlineBar, Font, and WordWrap.If your application requires you to save several grids, you should consider using the Archive method to compress and combine them all into a single archive file. You can later use the ArchiveInfo method to retrieve information from the archive file.
      

  2.   

    试过了,结果还是一样,这里我更正一下之前的说法,打开导出得EXCEL文件,看到的不是增加了很多合并行,而是,有很多行的行高值变得很大,不知道为什么,当全选整个表格,然后在格式->行->最适当的行高,格式就正常了,怪
      

  3.   

    问题又解决了,结论就是,这个VSFLEX的一个BUG问题,如果用了ISSUBTOTAL,则要先展开再导出,否则就会出现我以上的问题
      

  4.   

    有vsflexgrid及vsprint的資料嗎?發一個給我可以嗎?
    email:  [email protected]
    先謝過了!!
      

  5.   

    chenyu5188(来自东方的狼)高手:
       可以给一个下载的地址吗?另外,有关vsprint中自定义纸张如何设定?请指点,困挠许久了,请教了太多的高手至今仍没有解决啊,郁闷的很啊?
    先谢过!
      

  6.   

    TO xingmaohai(邢茂海):
      不好意思,我也是刚接触VSFLEX,没什么好的资料.
      

  7.   

    楼主!你在VSFLXD倒出XLS时!(你的VSFLXD有许多是合并单元格的),倒出的XLS不会合并单元格
        这个问题,我也遇到过