Is it possible to (1) create a new excel worksheet and write to it, (2) save
and close it, AND THEN (3) reopen it and CONTINUE adding rows where you left
off? I am making an application which logs events, where each event is
written to a new row. If so, then how?
I'm using C# with .NET and MS office 2003.
Thanks in advance. 1 1427
In message <O4************ **@TK2MSFTNGP09 .phx.gbl>, James Alba <a@a.com>
writes Is it possible to (1) create a new excel worksheet and write to it, (2) save and close it, AND THEN (3) reopen it and CONTINUE adding rows where you left off? I am making an application which logs events, where each event is written to a new row.
Yes. You just need somewhere to store the last row number; somewhere in
the spreadsheet, for example. Or you could iterate through the rows
until you find an empty one.
Personally, I'd write to a text file. It's easier, faster, doesn't load
the Excel Monster into memory and doesn't depend on Excel being
installed. You can always import it into Excel.
--
Steve Walker This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: hokiegal99 |
last post by:
I've written a small script (with much help from this list) that
searches through a directory for files without a PC filename extension
like .doc .xls and then adds them. The reason for writing the script is
that I'm migrating several dozen Mac users to PCs over the next few
months and many of the Mac files do not have PC filename extensions.
There are thousands of these files. The script runs on a Linux ftp
server where the files are...
|
by: DavidGeorge |
last post by:
I have made a fundamental error in design and ignored security until
the end of the project. This is largely because the whole process was
a steep learning curve (helped enormously by this group) and I didn't
know when I started (and still don't really understand), how to
implement security.
I have an application in two parts:
- the first part is used by a number of people on standalone laptops
who collect information about patients. ...
|
by: OhMyGaw |
last post by:
Hello Excel/automation Gurus,
I am working on an application where I have to keep a centralized
database of all macros distributed to user and save the changes back on
a nightly basis back to one central Excel macro repository.
What would you guys suggest me do?
Should I keep all macros in a centralized unique text file of some sort
or is it best to do with SQL server?
|
by: Brian Conklin |
last post by:
Hello Eneryone,
I am having a problem. I have written a little app that will take a text
"pipe" delimited file and place all of the values in to an Excel
spreadsheet. It works great on any of my XP Pro machines. When I install the
app on a Win2K Pro machine, I get the following error message:
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80020008): Bad variable type.
at...
|
by: Michael Russell |
last post by:
Hi all,
Using C#, I've created a simple wrapper class for using Excel. I have
Office Pro 2003 installed on my devel machine. The wrapper class works
great, reading and writing to/from Excel. To do this, I created a
reference to "Microsoft Excel 11.0 Object Library", and have a "using
Excel;" directive.
I decided to add a method for creating a TextBox using the
Shapes.AddTextBox method, which requires a
| |
by: nkechifesie |
last post by:
Hi, I have written a VBA program that runs on Excel and puts data on the excel sheet. This runs everyday. I want to be adding the dates to the files, this date is gotten from the excel sheet that uploads into the report excel file. Below is the Code I wrote which doesnt work, please could you help me
Sheets("Matrix sheet").Select
Today = Cells(1, 1) 'The location of the date on the raw sheet
Today = Format(Today,...
|
by: rishiyo |
last post by:
Good ones!! I want to retrieve and add datas with excel. I've tried one by adding two textboxes and two command buttons. THE code is:
'do declare these variables you need to add a reference'to the microsoft excel 'xx' object library.
'you need two text boxes and two command buttons'on the form, an excel file in c:\book1.xls
Dim xl As New Excel.Application
Dim xlsheet As Excel.Worksheet
Dim xlwbook As Excel.Workbook
Private Sub...
|
by: Paradigm |
last post by:
Hi,
I am a newbie at VBA and have managed to piece together a project using snipits of codes from books and the internet.
The project involves using an access database to populate an excel file.
The excel file is generated by the database rather than opening and excel file already on the computer.
I have the need to add a Worksheet_Change event on a particular sheet in the excel file.
I know how to add a standard module with code but...
|
by: ndedhia1 |
last post by:
I am reading in a file to see what delays I am getting on what IP address:
QuoteBlockTiming exceeded 1000 ms: 1684 --- Fri Nov 06 06:09:10 CST 2009 170.137.94.95 Class key = 649126730 block size = 1 session = W_MAIN
QuoteBlockTiming exceeded 1000 ms: 1640 --- Fri Nov 06 06:09:18 CST 2009 170.137.94.2 Class key = 649126749 block size = 1 session = W_MAIN
QuoteBlockTiming exceeded 1000 ms: 1146 --- Fri Nov 06 06:28:25 CST 2009 170.137.88.2...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |