Acording to my client requirement,we are replacing ASPOSE technology by OPENXML SDK to read and write Excel 2007 (.xlsm macro-enabled file),and in fact we are able to accomplish the job using openxml sdk.
However the problem starts when we compare the execution time,if the data is too large(reprting data for eg 18k) to be read or written,ASPOSE is too fast in compariosn to OPEN XML SDK.
We take the following approach given in the below link and it works perfectly but the real issue is excution time it takes is too much,during wich we loose the trasaction time out.
http://msdn.microsoft.com/en-us/library/office/hh180830.aspx
If OPENXML SDK failes to deliver result in lesser time than ASPOSE,only then the OPENXML SDK is aceepted otherwise our effort given finding and writing open xml sdk code is in vain.
basically we have are taking entire huge data in dataset and write using any of the above technology.
Any help to improve permance in terms coding will be highly appreacited.
The problem is one of working set, not one of IO time. Allocation of too much memory will slow down your application more than just about any other factor. It is best if you use a streaming approach. Some time ago I recorded a screen-cast that uses a streaming approach - it generates a worksheet at around the rate of 10,000 rows per second (for rows that have 20 columns of data). This is near to being IO bound, so it would be difficult to speed up more than this. You would need to use faster disks.
You can find the screen-cast, and the example code here:
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2012/01/10/screen-cast-using-open-xml-and-linq-to-xml-in-a-streaming-fashion-to-create-huge-spreadsheets.aspx
-Eric
Related
I'm writing a program (C#) to read, convert, display, adjust and output point cloud data.
I can make every part of the program except for one - I am required to read in a proprietary file format. The data is coming straight from a laser scanner and we cannot get any closer to the stream than what is output to the proprietary file in binary.
I have an SDK from the manufacturer/proprietor that is well outside my scope of ability to deal with.
Firstly it is written in C++, which I can read and write to some degree but this all appears incredibly complex (there are hundred of header/source files).
Secondly, the SDK documentation says that I must create my SLN using CMake which is a nightmare for me also.
Thirdly, the documentation is scarce and horrid.
Basically my question is this:
I know that after a certain amount of header information I should find thousands of lines of "lineref,x,y,z,r,g,b,time,intensity".
Can I bypass the SDK and find another way to read in this file type?
Or, must an SDK from the proprietor be used to interact with their file type due to some sort of encryption?
My goal is as follows: I have to read in a video that is stored on the sd card, process it frame for frame and then store it in a new file on the SD card again,In each image to do image processing.
At first I wanted to use opencv for android but I did not seem to be able to read the video
here.
I am guessing you already know that doing this on a mobile device or any compute limited devices is not ideal, simply because video manipulation is very computer intensive which translates to slow execution and heavy battery usage on many devices. If you do have the option to do the processing on the server side it is definitely worth considering.
Assuming that for your use case you need to do it on the mobile device, then OpenCV on Android will now allow you to read in a video and access each frame - #StephenG mentions this in his answer to the question you refer to above.
In the past, functionality like this did not get ported to the Android OpenCv as the guidance was to use ffmpeg for frame grabbing on Android devices.
According to more recent documentation, however, this should be available for Android now using the VideoCapture class (note I have not used this myself...):
http://docs.opencv.org/java/2.4.11/org/opencv/highgui/VideoCapture.html
It is worth noting that OpenCV Android examples are all currently based around Eclipse and if you want to use Studio, getting things up an running initially can be quite tricky. The following worked for me recently, but as both studio and OpenCV can change over time you may find you have to do some forum hunting if it does not work for you:
https://stackoverflow.com/a/35135495/334402
Taking a different approach, you can use ffmpeg itself, in a wrapper in Android, for tasks like this.
The advantage of the wrapper approach is that you can use all the usual command line syntax and there is a lot of info on the web to help you get the right parameters.
The disadvantage is that ffmpeg was not really designed to be wrapped in this way so you do sometimes see issues. Having said that it is a common approach now and so long as you choose a well used wrapper library you should at least have a good community to discuss any issues you come across with. I have used this approach in a hand crafted way in the past but if I was doing it again I would use one of the popular examples such as:
https://github.com/WritingMinds/ffmpeg-android-java
I have a mid sized code library (several thousand lines) that uses Excel Interop (Microsoft.Office.Interop.Excel).
The program that keeps a workbook open for hours at a time, and does manipulations like adding/editing text, shapes, and calling macros.
I have not once seen a Marshal.ReleaseComObject. Yet, the users don't report any problems.
In all cases, the objects go out of scope within several seconds.
So, is this a problem? How? If yes, how do I justify to management that it needs cleanup? If not, why recommend it in the first place?
It's been a while, but I did a lot of Excel automation from .NET. I never used Marshal.ReleaseComObject either. Never saw a problem.
I've got an Excel file that takes ~10 inputs and outputs ~5 numbers. The problem is, the calculations run involve lots of assumptions, are rather complex, and laid out over 5 excel sheets with lots of lookup tables, etc.
I'd like to wrap the Excel model in an iPad app -- so that it's easy to solicit user input and show the easy outputs without having them to see the dirty work beneath.
It's important for me to encapsulate the Excel model since that's still getting tweaked and adjusted... so to have a wrapper set up as opposed to reproduce the logic in the Excel file would save me probably 2 orders of magnitude of time.
Have looked around and not found a way to do this yet... any thoughts?
Thanks
Two options come to mind.
One is that you can use an excel wrapper on iOS. Details can be found here: How can i create excel sheet and file in iPhone sdk?
The second option is to setup a server and pass the task onto the server. I'm familiar with Ruby, and creating/modifying excel files in Ruby is a breeze. I'd expect PHP, python, etc. to have similar faculties.
Either option is going to depend on your use case, whether you're charging for the app or not, and your familiarity with server side programming.
Intense googeling failed to turn out a single decent example of how to program the RTC.
all I could find were examples for the C5000/4000 models, which seems work differently as I was unable to locate any of the header files required to get the sample code to compile.
the closest I got was finding the RTC user manual, but it's no help at all on the subject of actually programming the real time clock using C
I'd appreciate to no end a working example or a pointer to where such an example exists
I'm assuming you are using TI's DSP/BIOS, as this seems to be the most common manner in which the C6000 family of DSPs are used. The DSP/BIOS operating system provides a number of APIs for interfacing with the real time clock (the CLK module). These APIs abstract away the registers and other low-level details of the RTC as described in the RTC user manual. This is generally the simplest way to use the clock as it avoids the need to manually "program" it.
See the CLK section in the API reference.