Flexcell User Custom Print Template

xiaoxiao2021-03-06  61

'Description: You can only load a picture now

Private sub flow_load ()

DIM imageROW as long '

DIM imagecol as long 'The column where the picture is located

DIM IMAGHEIGHT As long 'at the height of the line

Dim imagebln as boolean 'True has a picture cell

WITH GRID1

'----------------------------------

'Description: Basic information of the module

ImageBLN = false

'Loading file

.Openfile "c: /1.cel"

'Judgment the form of a picture cell, if any, get the width and height of the table

For i = 1 to.ROWS - 1

For j = 1 to .cols - 1

IF .cell (i, j) .imagekey <> "" "

Imagerow = i 'picture is located

ImageCol = J 'The column where the picture is located

iMagHeight =.rtowheight (i)

ImageKey = .cell (i, j) .imageKey 'picture keyword

ImageBLN = true 'exists in image cells

END IF

NEXT

NEXT

'Number of lines

Row = .ROWS - 1

'Check and copy

.Range (1, 1, row, .cols - 1) .selected

.Section.copydata

.Autoredraw = false

'----------------------------------

'----------------------------------

'Description: Load data

FOR i = 1 to 10

'Insert a line: the same number of selected lines

.Serection.inSertrows

.Range (1, 1, row, .cols - 1) .selected

'Check data

.Serection.Pastedata

'Judging whether there is a picture

IF ImageBLN THEN

.Cell (Imagerow, Imagecol) .SetImage ImageKey

.Rtowheight (iMagerow) = iMagHeight

END IF

'Page Breaks

.Hpagebreaks.add row 1

NEXT

'----------------------------------

.Refresh

.Autoredraw = true

End with

End Sub

转载请注明原文地址:https://www.9cbs.com/read-84670.html

New Post(0)