SasReader 1.0.3
See the version list below for details.
dotnet add package SasReader --version 1.0.3
NuGet\Install-Package SasReader -Version 1.0.3
<PackageReference Include="SasReader" Version="1.0.3" />
paket add SasReader --version 1.0.3
#r "nuget: SasReader, 1.0.3"
// Install SasReader as a Cake Addin #addin nuget:?package=SasReader&version=1.0.3 // Install SasReader as a Cake Tool #tool nuget:?package=SasReader&version=1.0.3
SasReader.NET
This is the port of parso Java library for SAS files reading implemented by the EPAM https://github.com/epam/parso
How to use
The library is available as a NuGet package
Install using
Install-Package SasReader
or
dotnet add package SasReader
Code example
using SasReader;
using System.Text;
// Initialize SAS file reader
using FileStream sasToParseFileInputStream = File.OpenRead("C:\\dev\\resources\\sas7bdat\\all_rand_normal.sas7bdat");
SasFileReader sasFileReader = new SasFileReaderImpl(sasToParseFileInputStream);
// Read and print META DATA ********************************************************************
var sasMetaColumns = sasFileReader.getColumns();
var sasMetaProps = sasFileReader.getSasFileProperties();
Console.WriteLine("Columns:");
foreach (var column in sasMetaColumns)
{
Console.WriteLine($"\t Name: {column.getName()}");
}
Console.WriteLine("Properties:");
Console.WriteLine($"\t Name: {sasMetaProps.getName()}");
Console.WriteLine($"\t Rows count: {sasMetaProps.getRowCount()}");
Console.WriteLine($"\t File type: {sasMetaProps.getFileType()}");
Console.WriteLine($"\t File label: {sasMetaProps.getFileLabel()}");
Console.WriteLine($"\t Date created: {sasMetaProps.getDateCreated()}");
Console.WriteLine($"\t Date modified: {sasMetaProps.getDateModified()}");
Console.WriteLine($"\t Encoding: {sasMetaProps.getEncoding()}");
Console.WriteLine($"\t Endianness: {(sasMetaProps.getEndianness() == 1 ? "LITTLE_ENDIANNESS" : "BIG_ENDIANNESS")}");
Console.WriteLine($"\t CompressionMethod: {sasMetaProps.getCompressionMethod()}");
// Read and print DATA *************************************************************************
long rowCount = sasFileReader.getSasFileProperties().getRowCount();
Console.WriteLine("\nDATA:");
for (int i = 0; i < rowCount; i++)
{
var row = sasFileReader.readNext(); //object[]
Console.WriteLine($"Row {i, 2} : {string.Join(", ", row)}");
}
License
Copyright (C) 2015 EPAM
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Ardalis.SmartEnum (>= 2.1.0)
- ByteArray (>= 1.2.2)
- System.Text.Encoding.CodePages (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.