GitXplorerGitXplorer
a

XlTableFormat

public
3 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
2218296ecfc7dbf8981e588841a7afbc7f4877bb

Collapse intro heading in README

aatifaziz committed 11 years ago
Unverified
457bbff30068ac83a22500792927bb13b1d884e9

Adding README doc

aatifaziz committed 11 years ago
Unverified
dac8e80c056046257689409feceadbb071925175

Declaring all types partial for lib scenario

aatifaziz committed 11 years ago
Unverified
7f971118d774a0abacaa9d962fd0ed9b49b81ea4

Tests for arg checks

aatifaziz committed 11 years ago
Unverified
99059c9d194e2afe76a3b59d36de07044fdb7fcb

Fix for cell after a consecutive cells being dropped

aatifaziz committed 11 years ago
Unverified
9763270833c5b0b3dcce8595333b7edddcc5c67e

Fix for Reader.Dispose exception masking test AssertionException

aatifaziz committed 11 years ago

README

The README file for this repository.

XlTableFormat

The XlTable format is a fast table format when using Dynamic Data Exchange (DDE) to get data from Microsoft Excel. This project provides a single C# file called XlTableFormat.cs that adds the neccessary types and code to read and decode the XlTable format.

Installing

There is a NuGet package that embeds XlTableFormat.cs in a C# project.

There is no stand-alone class library version. If you need one, create a C# class library project, add the XlTableFormat.Source package from NuGet and declare the following types public:

public partial class XlTableFormat {}
public partial interface IXlTableDataFactory<out T> { }
public partial class XlTableDataFactory<T> { }

Usage

The simplest way to read the XlTable format is to use ones of the following XlTableFormat.Read overloads, each of which takes the data as input (either as a byte array or as a stream) and lazily yields a sequence of decoded objects:

public static IEnumerable<object> Read(byte[] data)
public static IEnumerable<object> Read(Stream stream)

The XlTable format defines the following data block types:

  • Table
  • Float
  • String
  • Bool
  • Error
  • Blank
  • Int
  • Skip

The type of each object in the sequence returned from the Read method is mapped from XlTable data blocks to C# and runtime types as follows:

  • Table = array of int with two integers, the row and column count respectively
  • Float = double
  • String = string
  • Bool = bool
  • Error = ErrorWrapper
  • Blank = null
  • Int = int
  • Skip = Missing.Value

The first object returned in the sequence always defines the table dimensions as an array of two integers with the row count as the first integer and column count as the second. The remaining objects are sequential content of table as cells values.