博文

目前显示的是标签为“File”的博文

log ClosedXML

Microsoft Visual Studio 1. NuGet Package Manager installs ClosedXML that depends DocumentFormat.OpenXml, ExcelNumberFormat, and WindowsBase. 2.using ClosedXML.Excel; using System; using System.Data; using System.Data.OleDb; using System.IO; 3. read .xlsx file using (var workbook = new XLWorkbook(xlsxfile)) { ...   var ws = workbook.Worksheet(1);   foreach (var row in ws.Rows())   {if (!row.IsEmpty()){string cell1 = row.Cell(1).GetValue<string>();                                      object value =row.Cell(1).Value; }   } } 4. OpenFileDialog             using (OpenFileDialog openFileDialog = new OpenFileDialog())             {       ...

Reading files in JavaScript using the File APIs

Introduction From : http://www.html5rocks.com/en/tutorials/file/dndfiles/ HTML5 finally provides a standard way to interact with local files, via the File API specification. As example of its capabilities, the File API could be used to create a thumbnail preview of images as they're being sent to the server, or allow an app to save a file reference while the user is offline. Additionally, you could use client-side logic to verify an upload's mimetype matches its file extension or restrict the size of an upload. The spec provides several interfaces for accessing files from a 'local' filesystem: File - an individual file; provides readonly information such as name, file size, mimetype, and a reference to the file handle. FileList - an array-like sequence of File objects. (Think <input type="file" multiple> or dragging a directory of files from the desktop). Blob - Allows for slicing a file into byte ranges. When used in conju...