Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers
RSS

Navigation


Quick Search
»
Advanced Search »


Export2ASCII

RSS

Syntax


public static void Export2ASCII(this WealthScript obj, string path)
public static void Export2ASCII(this WealthScript obj, string path, string extension)
public static void Export2ASCII(this WealthScript obj, string path, string extension, string customDateFormat)

public void Export2ASCII(string path) public void Export2ASCII(string path, string extension) public void Export2ASCII(string path, string extension, string customDateFormat)

Parameter Description

pathThe path to export directory ending with a backslash ("\")
extension(optional) File extension e.g. csv, txt, asc
customDateFormat(optional) Custom DateTime format (see below)

Description

Exports data to ASCII comma-separated files. Sample data string:

07/31/2009,162.99,165,162.91,163.39,15090600

Example

Example using C# extension methods:


using System;
using System.Collections.Generic;
using System.Text;
using WealthLab;

public class Export2ASCII_demo : WealthScript { protected override void Execute() { string path = @"C:\Data\ASCII\"; this.Export2ASCII( path ); } }

Legacy syntax example:


using System;
using System.Collections.Generic;
using System.Text;
using WealthLab;
using Community.Components;

public class Export2ASCII_demo : WealthScript { protected override void Execute() { Utility u = new Utility( this ); string path = @"C:\Data\ASCII\"; u.Export2ASCII( path ); } }

Getting dates formatted in a custom way

To create the Date/Time in one of the standard formats (or in a custom one), specify an optional Custom DateFormat by passing its string as one of the method's parameters. Format examples can be found on Microsoft's site:


Standard DateTime Format Strings
Custom DateTime Format Strings

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.


ScrewTurn Wiki. Some of the icons created by FamFamFam.