473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Work with excel or other ole automation object

Hi,

I'd like to know how to work with excel using C#. I known how to do it in
Delphi but I new in C#. I just want a small exemple. And if anyone knows if
there are diferrence working with excel por pocket pc, let me known. I just
want to put some values and format some cells and columns...
Any site or book that I should read?

TIA,
Heriberto
Nov 16 '05 #1
5 5516
Hi,

There are a couple of sites -- try this small example
http://www.c-sharpcorner.com/winforms/ExcelReadMG.asp

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Heriberto" <he*******@mathemathics.com.br> wrote in message
news:ON**************@TK2MSFTNGP15.phx.gbl...
Hi,

I'd like to know how to work with excel using C#. I known how to do it in
Delphi but I new in C#. I just want a small exemple. And if anyone knows
if
there are diferrence working with excel por pocket pc, let me known. I
just
want to put some values and format some cells and columns...
Any site or book that I should read?

TIA,
Heriberto

Nov 16 '05 #2
hi,
as i know, stream classes like , filereader etc are readers that use buffer.
is there any possibility to directly read files from hdd (i need to know
how fast file is read so no buffers should exist)
i mean it is like C
read byte byte from hdd , not from buffered stream
thanks in advance
Erdem Kemer
Nov 16 '05 #3
Erdem,

The FileStream class does not use a buffer, rather, it calls the
CreateFile API and then ReadFile. Now, the OS may be doing some buffering,
in which case, you would have to ask for direct file access. Which API you
would use for that though, I do not know. However, once you know which API
to call, you can easily call it through the P/Invoke layer.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"erdem" <er***@kulube.net> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...
hi,
as i know, stream classes like , filereader etc are readers that use
buffer.
is there any possibility to directly read files from hdd (i need to know
how fast file is read so no buffers should exist)
i mean it is like C
read byte byte from hdd , not from buffered stream
thanks in advance
Erdem Kemer

Nov 16 '05 #4
You can't read byte by byte from a HDD, even a device driver can't do it, a
disk will allways read at least one cluster and cache the data in the HDD
cache.
The OS Filesystem will also cache the data read from the HDD driver, so
everything you do in top of it can't prevent caching.
The only thing you can do is pretend you are reading byte per byte (from
C/C++ or any other language) using FileStream.ReadByte in .NET, but
basically you are only moving a byte at a time from the internal buffer of
the stream to your application defined byte location (heap, stack,
whatever).

Willy.
"erdem" <er***@kulube.net> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...
hi,
as i know, stream classes like , filereader etc are readers that use
buffer.
is there any possibility to directly read files from hdd (i need to know
how fast file is read so no buffers should exist)
i mean it is like C
read byte byte from hdd , not from buffered stream
thanks in advance
Erdem Kemer

Nov 16 '05 #5
Greetings,

Here are a couple more 'excel'ent sites.
Articles on Office 2003 & code behind (VSTO)
http://msdn.microsoft.com/library/de...VSTMGBLab6.asp
http://msdn.microsoft.com/vstudio/of...stointro_link2
http://www.developer.com/net/cplus/article.php/3289051
http://www.officezealot.com/Office2003Zone/vsto.aspx
http://www.c-sharpcorner.com/OfficeNet.asp
http://msdn.microsoft.com/vstudio/office/default.aspx (Good ones)
http://msdn.microsoft.com/library/de...VSTMGBLab6.asp
http://msdn.microsoft.com/vstudio/of...l/excelobj.asp
http://msdn.microsoft.com/vstudio/of...vstsqlexcl.asp
http://support.microsoft.com/?kbid=306572

"Peter Jausovec" wrote:
Hi,

There are a couple of sites -- try this small example
http://www.c-sharpcorner.com/winforms/ExcelReadMG.asp

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Heriberto" <he*******@mathemathics.com.br> wrote in message
news:ON**************@TK2MSFTNGP15.phx.gbl...
Hi,

I'd like to know how to work with excel using C#. I known how to do it in
Delphi but I new in C#. I just want a small exemple. And if anyone knows
if
there are diferrence working with excel por pocket pc, let me known. I
just
want to put some values and format some cells and columns...
Any site or book that I should read?

TIA,
Heriberto


Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Ange T | last post by:
Hi there, I'm having pain with the VB behind an Access form. The form is used to create reports in Excel based on the details entered in the form. This has always worked without error on my...
10
by: Mark Day | last post by:
Hi All, I am using Access 2000 to generate over 40 Excel charts and pivot tables using early binding to the Excel 9.0 object library. I am finding that if I show the Excel object while processing...
1
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database...
7
by: taylor.bryant | last post by:
I am running: Win XP SP2 Excel 2002, Access 2002 (Office XP SP3) Using Visual Basic (not VB.NET) At one point (prior to XP SP2?!? - I can't pin it down), this did not happen and I was easily...
6
by: Frank X | last post by:
Excel 2002 introduced a capability to add custom worksheet functions to Excel direct from a COM/ActiveX object. I can use C# to develop a COM object which I can use fine from Excel/VBA, however...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
3
by: Carlos Magalhaes | last post by:
Hey All, I am doing some excel automation using the excel COM. I can do most of the functions and its working well until I come across a formula. I can run a formula and insert the formula...
5
by: Tim Frawley | last post by:
I created a .NET Com Class object for use in ASP reports to export database results directly to Excel. I have it all working just find but I cannot get the Excel process to go away after the job...
6
by: a.theil | last post by:
Please help! I need a simple excel automation, just 2 write some files into excel. I do: Dim oXL As Excel.Application Dim oWB As Excel.Workbook Dim oSheet As Excel.Worksheet Dim oRng As...
7
by: Eran.Yasso | last post by:
Hi, I have project that automate excel(using Excel COM) which works fine in my home. I took the project from my home to work and tried to build the project but it won't built. I get error "The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.