How would you extract data from a MS Project .mpp file? [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 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.

Related

Simple file version control module for .NET Web apps [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'm writing a Web app that allows a user to upload and store files; however I'd like to add a simple version history feature to the files they upload based on the file name.
Is there an existing framework/module I can integrate for the version history part or is it better for me to write it up myself? I feel like there could be a lot of plumbing that's already been done in a framework. I couldn't find any and most of my Google searches turned up actual project version control software.
I'm looking at using .NET and C# to make this Web app.
I don't know of any libraries off the top of my head, but this is something I would probably roll myself anyway. The solution is simple. Take a SHA-1 (or other appropriate) hash of the file bytes, and use that as the filename/primary key in your backing store for that version of the file. This is called 'content-addressable', and is a simplified version of what git does.
One possible benefit of this is that if 2 users upload identical versions of a file, you only have to store it once.
Then you just need an list somewhere that tracks which hashes go in which order for a given user filename.
EDIT:
Its also worth noting that if you were not dealing with blobs, but structured data or your app objects, you might get much of this functionality from your data store via SQL triggers, or the RavenDB versioning bundle, for example.
I would use a version control system, like Subversion. This will be really reliable, easily integrable, it will offer history (with great details) and capability to download any of the past versions. Bonus: you can even diff two versions (obviously this make sense only for text based file types).

Creating a excel file with Microsoft.Office.Interop.Excel without Excel installed [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've created a method to generate a excel file in C#, and it works great. But after all the development, we begin to question ourselves on the possibility to create these files on machines that do not have Office installed. I've made a few searches, and nothing has been found.
So, does anybody know of a way to generate excel files without Excel installed on a machine, but using the Interop DLL and OFFICE.dll?
If there isn't a way do it, is there any library that can make this work?
This library works without office installed: http://epplus.codeplex.com/
I have used it a few times and it worked nicely for me.
Personnaly i use this lib : https://code.google.com/p/excellibrary/
working great !
I have used NPOI. Its free and very good. For most people the drawbacks below are not big issues and I am sure they will be developed later so I only put them here to aid consideration.
The minor problems that I have so far are:
You cant easily "transpose" your data.
You cant easily insert columns.
No problem inserting rows, but you have to write your own custom functionality to insert columns or to transpose. I'm sure there are other limitations but I have not come across them yet. Overall, if these are the only 2 problems I have, I'll not complain (especially considering I have sufficiently resolved them for my own purposes).
If I had to export again at some point, I'd probably give the Office OpenXML library a try. But I'm not sure if this requires you to store a file on the server or not before transferring (or have office installed on the server). If either of these were true, I'd have to say no personally. This is the reason I did not use Excel Package (Linked in other answers). Not sure if it's changed but when I researched it, you had to store the file on the server before transferring it.
You do not have to install Excel all what you need Microsoft Office 2010 Primary Interop Assemblies.
You can download them from:
http://msdn.microsoft.com/de-de/library/aa288681(v=vs.71).aspx
OR
http://msdn.microsoft.com/de-de/library/ms247298(v=office.11).aspx

Virus Scanning of Binaries -- Blobs vs. Files [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
There has been a lot of discussion on SO about using blobs vs. files to store binaries, but the current issue I'm facing involves virus scanning. There are likely a lot of APIs that can be used to scan files saved to a file system. Are there any for blobs? Are there APIs that can be given streams or byte[]s and told to scan them for viruses and malware? If so, does anybody have any recommendations? Or is this yet another reason to steer clear of blobs?
FYI - I'm using C# and MongoDb right now for my blobs.
I was in need of a solution that the question was asking about. I evaluated a lot of things and came to the conclusion that there was really not one good .NET library for this. So I made my own.
The library is called nClam, and it connects to a ClamAV server. It is open-source (Apache License 2.0) library which has a very simple API. You can obtain it here: https://github.com/tekmaven/nClam. There is also a nuget package: nClam. I also have some instructions on how to set up the ClamAV server on my blog, here: http://architectryan.com/2011/05/19/nclam-a-dotnet-library-to-virus-scan/.
I don't know if APIs exist for scanning in-memory data (I haven't found any), but you can always put your binary data into a temporary file, scan the file (by calling an external program working in command line) and delete it when it's done.
Certainly Sophos's API (SAVI) can scan arbitrary memory buffers - you can provide call-backs for accessing the data, so it can be any data you can access.

Import / read / load variables from matlab matfile in 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 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.

Good GIS Software or Components for Windows PC in .NET? [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 4 years ago.
Improve this question
Last week i searched for good free or opensource solutions and component for GIS (Geographical Information Systems) I founded some system but no one fill my requirements
SharpMap is very buggy software
Gmap.net is very slow
MapWindow have a very complex structure and is very buggy.
I founded uDIG but is in java, i need a solution in vb.net or c#.
Anyone know a good solution that fill my requirements or have alternatives, i accept solutions?
You are limiting yourself a lot by insisting on .NET. I don't know of anything other than SharpMap or MapWinGIS ActiveX (MapWindow). Here are some free, but not .NET, options for Windows desktop applications.
If you'd consider writing your standalone application in Python or C++:
Mapnik
QGIS
Or if you'd consider writing a plug-in or a customisation for an existing GIS:
GRASS can be customised in Python, Perl, Ruby...
QGIS can be customised in Python
I think that you've covered it already. There really aren't any production quality open source GIS project out there using C#. Most of the good work is being done in Java, C/C++ or Python these days. If you must use the .NET Framework then I think the best of the bunch is indeed SharpMap.
Failing that you need to look at commercial products from companies like http://www.esri.com. Of course, it also depends on what you need: web services, Windows Forms control, WPF, etc. In the past I've managed to whip up some C# that constructed the right XML to send to a Java server-based mapping engine, so you could look at something like GeoServer and build your own client. Obviously not what you want to get in to but I don't see that you have many options beyond the ones you've listed.
I would recommend to look in to MapAround
Have you checked out SharpMap? It's available on codeplex.
MapSurfer.NET framework might be a good option.
MapSurfer.NET is free, modern cartographic framework which is able to provide maps of superior cartographic quality. This framework supports a bunch spatial data formats (e.g., Shape files, PostgreSQL, OSM, etc.) and web services (e.g., CartoDB, Mapzen, etc.). Furthermore, its setup includes MapSurfer.NET Studio application which allows creating and editing map styles (analogue of TileMill). Its symbology is inspired by both OGC specifications and other similar toolkits such as MapServer, GeoServer or Mapnik.
We use Mapzania (http://www.mapzania.com).
The best thing about it is that you load it into existing web-applications via a NuGet package and then you get a bunch of GIS functionality.
It uses Leaflet as its front-end and it has JS library that makes it easy to do stuff to Leaflet.
It also has a nice MapStyler for creating and editing maps.

Categories