Multi-tab Excel Report

Multi-tab Excel Report

  
Hi all,

Is it possible to export a multi-tab excel report?


Best regards,
RP
Hello Rui,

Are you talking about multi-sheet? If you are, than this is possible.
Can you tell what you mean about multi-tab excel?

Kind regards,
TJ
Yes, multi-sheet.
Thanks,
RP
Hi Rui,

Please find attached a sample related with the multi-sheet excel!
Regards,
Paulo Garrudo.
Thanks, it is works fine!

Best regards,
RP
Hello Paulo,

I'm using the extension and works fine!
I need an Excel Workbook and for that I set up the parameter OutputFileType = false.
It saves in .xls ok!

But people who receive the file can't open it, because they don't recognize .mht files.. (they're in China).
Even though the extension is .xls, the content is .mht.

Did somebody had the same issue?

Thank you!

Hi Carolina

 

.MHT is a format that typically can only be opened by a web browser. In my (Excel 2007) when I try to open this XLS file what I get is a warning that "the type of the file is different from the extension, it might be a security threat, do you want to open the file". It is possible that, under different security policies and/or versions, Excel will not even allow you to open the file.

 

I believe the important here is to understand why the eSpace is generating MHT instead of XLS (possibly it is defining the wrong file format output).

I will look into this and let you know.

 

Cheers,

Hello

 

I have looked into the eSpace and it is effectively generating MHT, not XLS. It is possible that implicit conversion from MHT to XLS works with some versions of Excel and not with others. This is, however, an "excel-ready" MHT, so it is possible to simply open it with Excel and re-save it as XLS.

 

You might be interested in doing that with an extension, or so, in order to generate actual Excel files.

 

Cheers,

Hi Acacio!
Thank you for your reply...
The user is doing this now (open and saving as .xls) but they want the application to send it automatically.. so I'll try to make the extension to read the generated MHT file and save it as XLS.
Let's see what happens. I'll come back here.
:D
I've created an extension to open the excel (giving a path) and save as excel workbook.
If I test here locally (using debug in Visual Studio and a windows form) it works perfect as expected.

But when I publish in Test Server I get this error:

"Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154."

I think it's something regarding the excel component installation so I'm checking here with the server administrator.

(Because I was facing errors, if you open the extension you'll see a lot of tracing hihihi.. but for your usage feel free to remove it)

Find attached the extension and the solution.
Based on the error message I can see two problems:

1- To use this approach, executing Excel Automation on the server, you must install the MS Excel on the server.
2- It will be also necessary to execute the request with the correct permissions. For this I can advise you to configure the RunAs setting of you espace with a administration user account.

Hi Carolina

 

I could suggest a different approach: use the same library that is used by OutSystems to control Excel files (GemBox) to make the join. You could create a simple action to receive several Excel files (created with the RecordListToExcelNode) and merge them all in a single Excel file.

 

If I have the time, I will try to make one such extension, but you can try it yourself. Make sure to locate the GemBox.Spreadsheet.DLL from your Platform Server folder.

Ok!! I'll try!!

Thank you!!


Now I get
Error:License not set. Call SpreadsheetInfo.SetLicense() method before using any other class from GemBox.Spreadsheet Professional library.
Hi!!

I came back to the first option and solved the COM error following the steps in this URL
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

Now works.
Hi all..
i have Some problem with using Setlicense() method..

here Some of my code... (iTs Visual Basic .Net Progrmming language... and a Windows Form Application)

Imports GemBox.Spreadsheet.ExcelFile
Public Class Form1
    Dim ExcelUygulamasi As New GemBox.Spreadsheet.ExcelFile
    Dim Kartvizitler, Firmalar As GemBox.Spreadsheet.ExcelWorksheet
    Dim UygulamaDizini As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")
        Dim Kartvizit(0, 6), Firma(0, 1), veri As String
        UygulamaDizini = System.Windows.Forms.Application.StartupPath
        Dim Dosya As String
        Dosya = UygulamaDizini & "\Data\Telefon Rehberi.xls"

 i called that  method at first line of Form Load event...

Whats causes that problem i cant find.. is that method  makes a serial verification ..  Or we are definig a Serial code ?

why causing Setlicense error when i run my application.. ? Calling that method in wrong step ?

Carolina How can u Solve that error? Can u explain pls.. :)
Hi!!!
Using GemBox I got license problem as well... and I was with lack of time, so I didn't go any further.
I used the first option (Excel Automation) and not the GemBox.
Good luck and if you find the answer please share with us!! 
:D


hehe.. ok if  i can Find iT beFore Gone Mad fuLLy.. :D:D:D
Hi again..

I find Some thing.. when i changed

this code:
**********************************************************************************
Imports GemBox.Spreadsheet.ExcelFile
Public Class Form1
    Dim ExcelUygulamasi As New GemBox.Spreadsheet.ExcelFile
    Dim Kartvizitler, Firmalar As GemBox.Spreadsheet.ExcelWorksheet
    Dim UygulamaDizini As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")
        Dim Kartvizit(0, 6), Firma(0, 1), veri As String
***************************************************************************************************
To :
***************************************************************************
Imports GemBox.Spreadsheet.ExcelFile
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("EBC1-DEF2-JKL3-MNO4")
Dim ExcelUygulamasi As New GemBox.Spreadsheet.ExcelFile
Dim Kartvizitler, Firmalar As GemBox.Spreadsheet.ExcelWorksheet
Dim UygulamaDizini As String
Dim Kartvizit(0, 6), Firma(0, 1), veri As String
***************************************************************************
hey Caroline are u understand..? Firstly using that method.. look i made a variable defining previous code before call setlicense() method :) that causes error..

Then.. Take  errors still.. but i get different errors.. First error .. Long Key Must Start with "E" char. :)

and i changed firs letter of serial to e char.. after then i get.. Long key has wrong checksum..


Now we need a valid serial key i think.. :) any1 have a valid serial pls share with us :)

I got the same

Error:License not set. Call SpreadsheetInfo.SetLicense() method before using any other class from GemBox.Spreadsheet Professional library.
if you get that error still.. look your code.. must be using of classes of gembox component :) like as variable definitions... or anything else.. 
i turned back free version till find valid serial..
if i cant.. i try reading textstream tactic from xls file.. reading text is more fast than excel automation :)
Hi Rui and others, 

If you're doing this for a company that can spend a little money on a license, winnovative has a nice library you could use.

Full excel support (opening/writing), multi-tab, write per-cell etc. You could even open an excel with graphs in it, add data, and save.

I've written a small (example) wrapper around it that could serve as a starting-point. It's on the network:

http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=135

B
est regards,
Hans
Hi all.

Indeed, there seem to be many ways to do what you're trying to do, and I have to salute the enthusiasm and activity going on in this thread :)

I will, however, have to ask you not to share any serials in our forums, nor anything that might border on illegal - I know there hasn't been anything wrong here, and let's keep it that way. You all have the code sample, and GemBox is a commercial product, so if yo uwant to test it they have a "Try" link at their website to see if you can do what you want with it.

I'm sure you understand that this being OutSystems' forum, we would not condone piracy.

Cheers, and good developing!

Paulo Tavares
ha ha ha..  :)
we are pirates.. and that greedy cash dodgers are  innocent little childs.. :)
i think The ReaL PiraTing is This one...!!!! How much is windows 7 cost? and Look this.. :) This iS juSt Robbering...! Im only earning onLy 433 $ per month..!

Now..I'm going to writing my datas on csv files and read them with text stream reader... its more faster than excel automation component of V.Studio... 
1 Developer License $ 480.00 Buy now
4 Developer License $ 990.00 Buy now
Ok. If you are going the CSV route, we already have the CSV component, which you may want to take a look into.

Cheers,

Paulo Tavares
I'm using the MultiSheetExcel application.... but today we discovered an issue.
Here at Schenker we use both URL: internal network and Internet (https).
And the export to excel doen't want to work with https.
Even changing the URLs with the correct protocol (because was all hardcoded "http://"), doesn't open and I get the errors:

[1] The underlying connection was closed: An unexpected error occurred on a receive.
[2] Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
[3] An existing connection was forcibly closed by the remote host

I'm still working on this but maybe someone already passed this...