Paste fpspread to Worksheet (VB6)

Posted by: lojawif822 on 15 January 2020, 5:45 pm EST

  • Posted 15 January 2020, 5:45 pm EST

    Hi,

    I am still new to fpsread.

    Is is possible to paste fpsread to existing opened Worksheet?

    This is because I need to add custom header in the Excel.

    Currently this is how it works


    Private m_WorkSheet As Worksheet
    m_WorkSheet.Activate

    'code to put my custom header
    ...

    'code to put data from fpspread <-- what to put here



    Thanks
  • Replied 15 January 2020, 5:52 pm EST

    I think i should post this to Spread COM instead of here
  • Marked as Answer

    Replied 16 January 2020, 4:23 pm EST

    Hi,

    The methods SaveBlockToBuffer and LoadBlockFromBuffer can be used to copy and paste the contents of a block of cells of Spread:
    https://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#funct316.html
    https://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#funct256.html

    Here, the contents are saved in binary form and the methods are very fast.

    Thanks,
    Pragati
  • Replied 29 January 2020, 7:19 pm EST

    Pragati.Kaushik said:
    Hi,

    The methods SaveBlockToBuffer and LoadBlockFromBuffer can be used to copy and paste the contents of a block of cells of Spread:
    https://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#funct316.html
    https://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#funct256.html

    Here, the contents are saved in binary form and the methods are very fast.

    Thanks,
    Pragati


    Thanks for the suggestion.

    But how to apply the LoadBlockFromBuffer for example want to paste the buffer to excel starting at cell C2?
  • Replied 30 January 2020, 8:10 pm EST

    Hi,

    You can use the following code for the purpose:

    fpSpread.LoadBlockFromBuffer(ByVal Col As Long, ByVal Row As Long, ByVal Col2 As Long, ByVal Row2 As Long, Buff As Variant)


    where,
    Col : Starting column index of block of cells

    Row : Starting row index of block of cells
    Col2 : Ending column index of block of cells
    Row2 : Ending row index of block of cells
    Buff : Pointer to the buffer

    Example: http://helpcentral.componentone.com/nethelp/spread8/websitehelp/funct257.html

    Thanks,
    Pragati
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels