Import / read / load variables from matlab matfile in C# [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've been searching for a while to see if anyone has done any work on reading Matlab mat files in CSharp, and it seems that there is nothing out there.
Has anybody seen any solutions?
I can't simply export my mat files to text and then read them into my C# code, because there are fairly complex structures.
I don't like to inter operate with Matlab and I don't want to use Python (SciPy with loadmat) either.

One option to try is the submission CSMatIO by David Zier on the MathWorks File Exchange. It's an API for .NET 2.0 that will allow you to read level 5 .mat files.
If you have to read newer .mat file formats, you can first load your .mat file into MATLAB and resave it as an older format using the SAVE function's version option.

ILNumerics is able to read and write to/from Matlab mat files, version 6.

Since CSMatIO doesn't seem to be supported, I'd like to share a link to a similar library for reading/writing MATLAB .mat files: MatFileHandler, which targets .NET Standard 2.0.

Wanted to add another alternative. The Accord.Math library (available via Nuget, or here: http://accord-framework.net/ provides a .mat file reader.

Related

How to read .RData files from .NET (without R)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
How to read .RData files from .NET?
Solutions provided to similar questions automate R to open an .Rdata file and return the data. The recommended way to do it in .NET would be to use the R.NET library, which is designed for fast data exchange with R.
But is there any way to read the .RData file from .NET without having R installed on the machine?
R.NET might still be the best way to go as it can be used without having R installed.
From the R.NET library GitHub page:
R needs not necessarily be installed as a software on the executing
machine, so long as DLL files are accessible (you may need to tweak
environment variables for the latter to work, though)
Note: R is provided under GPL 3 license, which mean that if you embed its DLL in a commercial .NET application, the source code of your application must be open:
You can distribute your application using a GPL library commercially,
but you must also provide the source code.
If you distribute this library in an executable, you must disclose your source code by
providing it either alongside your distribution or list an accessible
way (URL, physical copy) to obtain the source for 3 years. Does not
apply if you serve through a web portal.

Is there any .NET Core compatible library for reading excel spreadsheet file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to parse xlsx file on Linux from .NET Core Console application. However, I couldn't find any library for parsing Microsoft Office files that is supported by .NET Core 5 framework.
Have you taken a look at Excel Data Reader?
There's also a NuGet package if that makes it easier to install.
The API project file doesn't appear to have any COM interop requirements with Office, which is further supported by the existence of Android and Silverlight compatible projects included in the library.
Another possibility would be to use Gnumeric and ssconvert to convert the incoming file temporarily to a csv.
You can write a command line wrapper around that to encapsulate the process.
Update: This SO post details how to use ssconvert (as well as a few other command line alternatives): Convert xlsx to csv in linux command line

Looking for an Image Conversion Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for a conversion library that can convert my dds files to tga. I found imagemagick and DevIL. But both come with problems, because my specifications are as follows:
The library needs to be a 64-bit dll
The library needs to be managed (writing in C#)
DevIL has a wrapper called DevIL.NET, but this is 32-bits. I already tried to build the source in 64-bit, but I was missing a file and the author doesn't seem to respond at the moment.
ImageMagick doesn't seem to support dds formats.
Does anybody know a good library that complies to my requirements?
There is a way to do this but it's a bit painfull.
Humus provides C++ source code for both tga and dds reading and saving ( Download the latest framework ). You need to convert it to C# but this should be possible without any problems ( i did it once too ).
You'll find the code in the Imaging\Image.h and Imaging\Image.cpp.
Direct link to the Code( ZIP ).

How can I call the Acrobat feature OCR from C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I want to write a C# application that can utilize the OCR function in Adobe Acrobat. How can I call this? Is there a public API?
I believe this is part of the Adobe Reader software and is not accessible through an API. There's an API and libraries for constructing PDF documents per the format specifications, but OCR is something that concerns the reader and not the format. I'm afraid you would either have to use another library or implement it yourself.
There is no direct Adobe OCR API suitable for .net. There are some alternatives though, for what you are trying to achieve. There is a open-source .Net wrapper for Google's open-source Tesseract OCR available on GitHub here: https://github.com/charlesw/tesseract. This should get you OCR capability within C#.
From the documentation:
Getting started quickly
Add the Tesseract NuGet Package by running Install-Package Tesseract from the Package Manager Console.
Ensure you have Visual Studio 2012 x86 & x64 runtimes installed
Download language data files for tesseract 3.02 from tesseract-ocr and add them to your project, ensure 'Copy to
output directory' is set to Always.
Check out the samples solution ~/Samples/Tesseract.Samples.sln for a working example

How would you extract data from a MS Project .mpp file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I need to extract data from a .mpp file on the network and combine it with other data from several different databases. The application can be written in Perl, VB6, VB.net or C# but must be easily scheduled from a Windows based server.
What would you recommend to extract the MS Project data with no user intervention?
Is there any ODBC drivers available for MS Project?
Are there any modules (for Perl, VB, VB.net or C#) for opening a .mpp and reading activity data?
I would recommend using MPXJ (mpxj.sf.net) to extract data from Microsoft Project files. Don't be put off by the fact that it was originally a Java library - the current release of MPXJ includes native .net dlls as well as the original Java JAR file, thanks to the magic of IKVM.
Disclaimer: I maintain MPXJ.
MPP does have its own object model that can be used to access data in it. The info should be available here: http://msdn.microsoft.com/en-us/office/aa905469.aspx
Hope the following helps...
http://www.codeproject.com/KB/cs/PrjXlsRpt.aspx
Rgds
In order to read the MPP data you can use Aspose.Tasks for .NET. This component is a normal .NET assembly and can be used with any .NET application. It provides simple API to access project elements and data.
Disclosure: I work as developer evangelist at Aspose.
I have the same need. Here is what I found so far.
There is an OLEDB provider for microsoft projects, up to version MP 2007.
If Google it, there are enough sites quoting the connection string, but here is the one quote:
oConn.Open "Provider=Microsoft.Project.OLEDB.9.0;" & _
"Project Name=c:\somepath\myProject.mpp"
The problem with this approach seems to be that you have to install MS Project on the server. It is nuisance in any case, and an impossibility for me using hosting environtment.
So you are down to parsing .mpp. MPXJ is an excellent library as one commenter above suggests, and I can afford to wait, so I am waiting for them to release .NET version.
If you are resolved to get it done, get the code and see what they are doing. Other then in their source code/comments there is no (to my knowledge) documentation of the format.

Categories