Quantcast
Viewing all articles
Browse latest Browse all 1621

New Post: .xlsx. Date cell import to DataTable

No.
Problem was with a CurrentCulture. I'm from Russia, and with my culture this code don't work. Solution of my problem:
private DataTable xlsxToDT(string fileName)
{
    var prevCulture = Thread.CurrentThread.CurrentCulture;
    Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
    try
    {
        // Mine code here
    }
    finally
    {
        Thread.CurrentThread.CurrentCulture = prevCulture;
    }
}

Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>