Coder Social home page Coder Social logo

Support CSV about miniexcel HOT 9 CLOSED

shps951023 avatar shps951023 commented on May 11, 2024
Support CSV

from miniexcel.

Comments (9)

shps951023 avatar shps951023 commented on May 11, 2024

ExcelDataReader read csv all string type defualt
image

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

Creating and Editing Services Available for Users in Bulk

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

CsvHelper

void Main()
{
	var records = new List<Foo>
	{
		new Foo { Id = 1, Name = "one" },
		new Foo { Id = 2, Name = "two" },
	};
	var path =  Path.Combine(Path.GetTempPath(),$"{Guid.NewGuid().ToString()}.csv");
	using (var writer = new StreamWriter(path))
	using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
	{
		csv.WriteRecords(records);
	}
	Console.WriteLine(path);
}

// You can define other methods, fields, classes and namespaces here
public class Foo
{
	public int Id { get; set; }
	public string Name { get; set; }
}
Id,Name
1,one
2,two

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

LibreOffice Calc
image

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

image

input : 0 & "\"; ,"
ouput : 0,"""; ,"

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

csvhelper " convert to """"

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

image

System.IO.IOException : The process cannot access the file 'C:\Users\Wei\AppData\Local\Temp\c080ec8e-c38e-4971-be50-8663f312dbf6.csv' because it is being used by another process.

from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024


from miniexcel.

shps951023 avatar shps951023 commented on May 11, 2024

Lazy loading will meet if using stream it'll dipose before lazy loading, so system will show

System.ArgumentException
  HResult=0x80070057
  Message=Stream was not readable.
  Source=System.Private.CoreLib
  StackTrace:
   at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
   at System.IO.StreamReader..ctor(Stream stream)
   at MiniExcelLibs.Csv.CsvConfiguration.<>c.<.cctor>b__11_0(Stream stream) in D:\git\MiniExcel\src\MiniExcel\Csv\CsvConfiguration.cs:line 13
   at MiniExcelLibs.Csv.CsvReader.<Query>d__0.MoveNext() in D:\git\MiniExcel\src\MiniExcel\Csv\CsvReader.cs:line 17
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at MiniExcelLibs.Tests.MiniExcelCsvTests.Create2x2_Test() in D:\git\MiniExcel\tests\MiniExcelTests\MiniExcelCsvTests.cs:line 30


from miniexcel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.