473,606 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving

Hello All,
I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now if I
want to save to an excel sheet, I just change it to (.xls). when I do that it
saves every thing under A1, A2, A3,...etc. how can I get each box I have to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...
Oct 22 '08 #1
3 998

AFAIK : There are 2 ways you can acomplish this

1. Office Automation , however then the end user must have as working
version of office installed on his system

2. create a HTML table in code input all your values in the required rows
/ columns and save the result as a text file with the extension XLS

HTH

Michel Posseth

"karim" <ka***@discussi ons.microsoft.c omschreef in bericht
news:22******** *************** ***********@mic rosoft.com...
Hello All,
I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now
if I
want to save to an excel sheet, I just change it to (.xls). when I do that
it
saves every thing under A1, A2, A3,...etc. how can I get each box I have
to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...

Oct 22 '08 #2
On Oct 22, 7:23*am, karim <ka...@discussi ons.microsoft.c omwrote:
Hello All,
* * *I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now if I
want to save to an excel sheet, I just change it to (.xls). when I do that it
saves every thing under A1, A2, A3,...etc. how can I get each box I have to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...
I think you need to use Excel Interop by referencing "Microsoft Excel
1x.0 Object Library", however installing PIAs(Primary Interop
Assemblies) are said as recommended way.

Plus, you can create Excel spreadshet using OleDB namepsace, you can
search Google and CodeProject for similar results.

Hope this helps,

Onur Güzel
Oct 22 '08 #3
I think you could save it as a ".csv" file with the values separated by
commas (Comma Seperated Values). Excel can open such a file.

Bob

"karim" <ka***@discussi ons.microsoft.c omwrote in message
news:22******** *************** ***********@mic rosoft.com...
Hello All,
I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now
if I
want to save to an excel sheet, I just change it to (.xls). when I do that
it
saves every thing under A1, A2, A3,...etc. how can I get each box I have
to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...

Oct 22 '08 #4

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

Similar topics

7
7519
by: G-Factor | last post by:
Hi all I've just started learning about saving files. I got bit of a problem. The following code gives me an error about incompatible types. (Cannot covert from class character to char *). I would appreciate it if anyone could either help me out, or direct me to an online resource site that has information on saving/loading classes. I have found several tutorials, but they either do not really help (saving text files) or are too...
1
1906
by: Mahesh Devjibhai Dhola [MVP] | last post by:
Hi, User can adjust the size of columns of a table or the position of splitter in UI. We want these adjustments to be remembered when we restart the application. Currently, we are saving these adjustments by the user in an XML and saving that XML. We read the XML upon restart and make calls to set the adjustments. This approach becomes difficult as we add more controls and more settings can be made by the user. What other techniques can...
2
1822
by: manning_news | last post by:
Has anyone had a problem with Access 2003 not saving their coding? I've been using 2003 for a couple of months now and just this week noticed that some coding I'd done for a database was not there anymore. I reentered it and didn't have any problems for a couple of days. Today I entered some coding, saved it, opened another database, and when I opened my original database again, the coding I had entered was missing. Access 2000 always...
14
5523
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
2
3761
by: Peder Y | last post by:
My code is something like this: --------------- Image img = Image.FromFile("somefile.bmp"); FileStream fStream = new FileStream("someBinaryFile.dat"); BinaryWriter bw = new BinaryWriter(fStream); img.Save(bw.BaseStream, ImageFormat.Bmp);
4
10810
by: John Kandell | last post by:
Hi, I posted this in the asp.net group, but didn't get a response. Maybe someone here can help me with this... --- Would someone be able to shed some light on what is the cost of saving a DataTable to session vs saving a custom object of the same data.
4
3284
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any errors. After reading the ole object from db, I saved it to C: as file1.bmp and displayed on the web. But it can not be displayed. After I manually sent the file to wordpad, it shows
4
6716
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
2
2138
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, My app picks ccurrent time on the PC to retrieve data from sql DB, the Sql data is always data with non-daylight saving. The app runs on PC with both daylight saving and non-daylight saving. So the question is how to check the PC is daylight saving or not? can anyone know this piece code to handle this problem? Thanks in advance, Martin
27
6833
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to test the time zone offset on a variety of dates to see if it changes. Based on that, I developed the following checkDST() function which, as far as I can tell, should be sufficient. It checks either the date passed to it or the current date with...
0
8045
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, 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...
0
7981
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,...
0
8467
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, 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...
1
8127
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8320
tracyyun
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...
1
5994
isladogs
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...
0
4011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2458
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
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.