Hello folks,
you can use a Webservice in a Workflow to automatically write the CSV file.
In C#, this is written extremely fast, even if you do not know about coding yet.
This example takes a file name (complete path) and file content. If the file exists, it appends the content - if it does not, it creates the file.
Please remember that this code is just the very basic writing to file, without any error handling or validations or anything.
[WebMethod]
public string CreatePlaintextFile(string fullFilePath, string content)
{
Directory.CreateDirectory(Path.GetDirectoryName(fullFilePath));
if (!File.Exists(fullFilePath)
{
using (StreamWriter streamWriter = new StreamWriter(fullFilePath, false, Encoding.Unicode))
{
streamWriter.WriteLine(content)
}
}
else
{
using (StreamWriter streamWriter = new StreamWriter(fullFilePath, true, Encoding.Unicode))
{
streamWriter.WriteLine(content)
}
}
return "sucessfully wrote to file: " + fullFilePath;
}
Hope this helps.
Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant