예제 #1
0
        public IActionResult Export()
        {
            var invoices = ocrService.ModelTransform(roots);

            var builder = ocrService.ExportToCsv(invoices);

            //Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);


            //return File(Encoding.GetEncoding("GB2312").GetBytes(builder.ToString()), "text/csv", "invoices.csv");
            return(File(new UTF8Encoding(true).GetBytes(builder.ToString()), "text/csv", "invoices.csv"));
        }