cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Write CSV to local folder

Lakshmit
9-Granite

Write CSV to local folder

Hi All,

Using CSV parser extension service WriteCSVFile am storing CSV file in SystemRepository. But my requirement is to save the file to local folder. Is there a way we can achieve this.

 

Thanks in Advance.

 

Regards

Lakshmi.

1 ACCEPTED SOLUTION

Accepted Solutions
drichter
14-Alexandrite
(To:Lakshmit)

This will not work. All Services run on server side. There have no access to your local filesystem.

View solution in original post

6 REPLIES 6
drichter
14-Alexandrite
(To:Lakshmit)

First you create the file in a FileRepository and then you can use the GetFileListingWithLinks-Service of this FileRepository to download the file.

bot1q
11-Garnet
(To:Lakshmit)

Hi,

 

if you want to have an Export in your Mashup.

Use Data Export widget. This will save the CSV in your default browser location (or ask) when you press it.

Lakshmit
9-Granite
(To:bot1q)

Hi, 

Thank you for reply, but I want to avoid extra click for data export. Instead storing in Repository I was trying to save in local folder using below code.

 

var params = {
path: "/Data.csv" /* STRING */,
data: result1 /* INFOTABLE */,

 fileRepository: ??? --- Is there a way we can store in local folder?

// fileRepository: "SystemRepository" /* THINGNAME */,
withHeader: true /* BOOLEAN */
};
// no return
Resources["CSVParserFunctions"].WriteCSVFile(params);

 

Here WriteCSVFile function stores CSV in fileRepository mentioned in params(Here it is SystemRepository).

drichter
14-Alexandrite
(To:Lakshmit)

This will not work. All Services run on server side. There have no access to your local filesystem.

Sure, Then will try with FileRepository logic. Thank you for your support.
bot1q
11-Garnet
(To:Lakshmit)

If the export is somehow triggert from any User Input. Then just add a "automatic export" handler in the Date Export Widget and you will avoid an extra click.

Top Tags