Hi All,
I have created a basic form to collect some text and save it out in CSV format.
I'm not the best in the world at scripting......so would someone mind having a quick look over my scene and letting me know if I can improve the script
in any way??
Is this the most efficient way to create as CSV file in Ventuz?
I also wanted to force some rules for the text that is entered in the boxes, i.e. not allowing the text to be added to the file unless a valid email address is entered.
Would anyone know how I can accomplish this??
The scene is pretty basic at this point, but any other suggestions on the scene as a whole are also more than welcome
Thanks
Chris
Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
Save text to CSV file
Moderator: Support
Save text to CSV file
- Attachments
-
- Text to CSV.vza
- (34.39 KiB) Downloaded 253 times
Re: Save text to CSV file
may be you already found this: https://social.msdn.microsoft.com/Forum ... m=netfxbcl
I can't load your file currently, it's PLE. Don't know how large your file is and there is a for loop, you should use the thread class https://msdn.microsoft.com/en-us/librar ... 71%29.aspx
I can't load your file currently, it's PLE. Don't know how large your file is and there is a for loop, you should use the thread class https://msdn.microsoft.com/en-us/librar ... 71%29.aspx
3DJo - [Ventuz] freelancer and trainer
Re: Save text to CSV file
Hey,
Thanks for the reply joschy
Here's my code
It all works fine, just wondering if there is anything I should change to make it better??
Cheers
Chris
Thanks for the reply joschy
Here's my code
Code: Select all
//if file doesnt exist, create file
if (!File.Exists(filePath))
{
File.Create(filePath).Close();
}
// Append line to the file.
using (StreamWriter writer = new StreamWriter(filePath, true))
{
writer.WriteLine(Data);
}
changed = true;
Cheers
Chris