Excel exportation-report-Excel Buffer 370 Record more sheet

andy76andy76 Member Posts: 616
Hello,

I have used the record 370 Excel Buffer to export various report developed
ad hoc.

For one of them I have to create 4 sheets on same file. I made some test but
I can not solve that.

This is an example of my code:


TempExcelBuffer.CreateBook;
TempExcelBuffer.CreateSheet('My sheet 1','My sheet
1'Ordini',COMPANYNAME,USERID);

// I inserted others new record in Excel Buffer wanting to have them in 'My
sheet 2'

TempExcelBuffer.CreateSheet('My sheet 2','My sheet 2',COMPANYNAME,USERID);
TempExcelBuffer.GiveUserControl;

but all my records are then exported in My sheet 2 and My sheet 1 is not
considered.
How can I solve that?

Thank you

Comments

  • SavatageSavatage Member Posts: 7,142
    viewtopic.php?f=23&t=24087

    Once you add the AddSheet function to your excel buffer table as explained in the link above
    then you can add
    OnPostDataItem()
    Window.CLOSE;
    
    TempExcelBuffer.CreateBook;
    TempExcelBuffer.AddSheet;
    TempExcelBuffer.CreateSheet('MySheet4','MySheet4',COMPANYNAME,USERID);
    TempExcelBuffer.AddSheet;
    TempExcelBuffer.CreateSheet('MySheet3','MySheet3',COMPANYNAME,USERID);
    TempExcelBuffer.AddSheet;
    TempExcelBuffer.CreateSheet('MySheet2','MySheet2',COMPANYNAME,USERID);
    TempExcelBuffer.AddSheet;
    TempExcelBuffer.CreateSheet('MySheet1','MySheet1',COMPANYNAME,USERID);
    TempExcelBuffer.GiveUserControl;
    
    Giving you 4 of the same sheets
    Sample Export Report---> http://savatage99.googlepages.com/Repor ... ToExce.txt
  • andy76andy76 Member Posts: 616
    Ok, thank you, I could create 4 sheets but all with same records (rows and colums) of first one.

    I have to create the excel with for ex. 10 columns on 1 sheet and this is done ok (choice 1).

    And then they want, with another selection, an excel having the first 6 columns in all 4 sheets and 1 only additional column for each sheets (choice 2).


    (choice 1)
    columns A B C D E F G H I L all on 1 sheet ok

    (choice 2)
    columns A B C D E F G on sheet 1
    columns A B C D E F H on sheet 2
    columns A B C D E F I on sheet 3
    columns A B C D E F L on sheet 4

    Do you understand?

    I though to create a new function in Record 370 called DeleteColumn in which I could delete/hidden the other columns.
    The Macro Excel is for example:
    Columns("H:H").Select
    Selection.Delete Shift:=xlToLeft

    Is it possible to make a similar function in Record 370. How?

    Thank you very much
  • SavatageSavatage Member Posts: 7,142
    Oh I was going on your post...
    For one of them I have to create 4 sheets on same file. I made some test but
    I can not solve that
  • andy76andy76 Member Posts: 616
    Sorry, I don't understand your last reply.
    Isn't that possible or is it difficult?

    Thank you
  • SavatageSavatage Member Posts: 7,142
    Savatage wrote:
    Oh I was going on your post...
    For one of them I have to create 4 sheets on same file. I made some test but
    I can not solve that

    The last reply was basically saying - that you said your problem was creating 4 of the same sheets hence the solution I provided.
    The deleting columns thing is different and I wish I was an excel buffer expert but I'm not :cry: Hopefully someone else will chime in with that part of your goal.
Sign In or Register to comment.