cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to implement "upload a file" via VC?

Former Member
0 Kudos

Hi expert,

I want to do a prototype, it can upload a xls file from client and display it with a table view, is it able to implement it with VC?

Thanks and best regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Not really. As VC has no data "uploaded", but "just accesses" data from a data source, you'd need to define a datasource. VC is a server-bases system.

In case of an Excel-File you'd need to connect to the Excel-file (on a share that the VC-Server can access) and create a BI JDBC connection with a CSV-driver. More information about that in the Visual Composer WIKI under:

https://wiki.sdn.sap.com/wiki/display/VC/JDBCConnectionSetup

Former Member
0 Kudos

Hi Mario,

this certain share should of course the folder, which the VC has access resp. the JDBC connection is prepared. I hope Yang will provide us with the result.

Best Regards,

Marcel

Former Member
0 Kudos

I think you must have the file already in place when you define the connection. I never tried it but I doubt that you just enter a folder, and then the CSV driver accesses any file. Unless the driver works in the way that each Excel-sheet in every file in this folder is displayed as "table".

Former Member
0 Kudos

Hi Mario,

I think we have to test it. As I know it's possible to use every file as table then it should be possible to (re)name the excel file during the upload process. Of course then only one file is accessible in the model. Maybe another way is to use a dynamic sql statement depend on the filename. Of course there are some limitations.

By the way nice work in the WIKI!

Best Regards,

Marcel

Former Member
0 Kudos

Hi Mario,

I asked a colleague, he told me that a dynamic SQL statement is possible. And then you only need a webservice which returns the filename of the excel files in the folder then you can upload excel files and generate dynamic SQL statements for accessing them.

For this solution you have to create a webservice and you must have similar excel files so that you only have to modify the "from table" in your statement.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Ya Wang,

I never done something like this, but I have a idea for a solution. You can use the KM for uploading a file in a certain folder on your J2EE machine. Then you can use JDBC for reading the data from the excel file. In your model you can define the path to your folder.

Via Html view you can add your KM iView for upload.

That should it be...

Best Regards,

Marcel