EXPORTING TO EXCEL FROM ANDROID

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

EXPORTING TO EXCEL FROM ANDROID

Post by segxy4manu »

Hello friends,
Please can I get help for the following on a programme
To have a userbar on android that will allow export to .cvs (Excel) directly into the android without using computer
Thanks
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: EXPORTING TO EXCEL FROM ANDROID

Post by josh »

The export tool is only supported on Windows so you can't use that on Android. One option on Android would be to use the filewrite() function to write out a file in .csv format which could be opened in Excel.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: EXPORTING TO EXCEL FROM ANDROID

Post by htuser »

Hi Josh,
I imagined that the export statement could do this job. Does CSEntry Android doesn't support this statement?
Please let me know.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: EXPORTING TO EXCEL FROM ANDROID

Post by josh »

Export statement is not supported on Android.
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

Re: EXPORTING TO EXCEL FROM ANDROID

Post by segxy4manu »

Alright, thanks Josh
I will try the filewrite and see how it does work.
So this is achievable through bar on Android or Menu?
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

Re: EXPORTING TO EXCEL FROM ANDROID

Post by segxy4manu »

Josh,
Can you help with the script/syntax to filewrite and to save the file in .cvs and I want it to be on the menu bar if possible rather than to be in a menu in a question variable.
Thanks
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: EXPORTING TO EXCEL FROM ANDROID

Post by josh »

Do you want to export just the current case or do you want to export all the cases in the data file? For the later you need to be in a menu program since you cannot access the other cases in the main data file.
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

Re: EXPORTING TO EXCEL FROM ANDROID

Post by segxy4manu »

josh wrote: November 8th, 2019, 2:06 pm Do you want to export just the current case or do you want to export all the cases in the data file? For the later you need to be in a menu program since you cannot access the other cases in the main data file.
I want to export the current case, and wish to rename it incase of different cases.
Thanks
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: EXPORTING TO EXCEL FROM ANDROID

Post by josh »

In that case look on page 59 of the workshop materials https://www.csprousers.org/resources/CS ... rkshop.pdf in the section labeled "Writing and Viewing Reports". That shows how to use write out a text file using filewrite with data from the current case. The complete example app is available at https://www.csprousers.org/resources/CS ... erials.zip under session 7. It adds a user bar button to write out the text file.

To write out csv instead of plain text just change the file name to end with .csv and format it as comma separated values. Something like:

filewrite("%v,%v,%v,%v", NAME, AGE, SEX, RELATIONSHIP);
segxy4manu
Posts: 37
Joined: August 31st, 2016, 5:51 pm

Re: EXPORTING TO EXCEL FROM ANDROID

Post by segxy4manu »

josh wrote: November 8th, 2019, 2:37 pm In that case look on page 59 of the workshop materials https://www.csprousers.org/resources/CS ... rkshop.pdf in the section labeled "Writing and Viewing Reports". That shows how to use write out a text file using filewrite with data from the current case. The complete example app is available at https://www.csprousers.org/resources/CS ... erials.zip under session 7. It adds a user bar button to write out the text file.

To write out csv instead of plain text just change the file name to end with .csv and format it as comma separated values. Something like:

filewrite("%v,%v,%v,%v", NAME, AGE, SEX, RELATIONSHIP);
Thanks for this,
Hope it will help and will soon get back to you.

Josh, thumb up to you
Post Reply