CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: csharpit

Search: Search took 0.02 seconds.

  1. Copying data from one cell to another in Excel

    I am trying to write a Macro in Excel which makes a copy of some of the information entered and a timestamp of when the change was made. It also creates a new entry if existing information is edited...
  2. Connecting a VS Studio C# program to a local SQL Server database

    I want to connect this program to a copy of the database on my local machine. I have downloaded SQL Server Express 2005 Management Studio and have made a copy of the database and restored it to my...
  3. Replies
    2
    Views
    938

    Re: Copying Excel sheets

    {
    public class ExcelTest
    {
    static void Main(string[] args)
    {
    Excel.ApplicationClass excelApplicationClass = new...
  4. Replies
    2
    Views
    938

    Copying Excel sheets

    Hi,

    I need to write a simple program to do the following in a very large and complex Excel worksheet:

    1. Create a new worksheet (tab)

    2. Copy the data from the original worksheet to the new...
  5. Replies
    7
    Views
    1,250

    Re: Removing duplicate lines.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.IO;
    using System.Globalization;
    using System.Configuration;

    namespace inter
    {
    class clsProgram
  6. Replies
    7
    Views
    1,250

    Re: Removing duplicate lines.

    Thanks, but I am having trouble coding this and can't get it to work.

    Also, I have another requirement where the time difference needs to be applied to the previous line of the searched word. So...
  7. Replies
    7
    Views
    1,250

    Re: Removing duplicate lines.

    Yes it would be correct to assume that duplicate items always follow the next line and yes I did
    mean a duplicte of the date time stamp no the whole line.

    The solution you have described was...
  8. Replies
    7
    Views
    1,250

    Removing duplicate lines.

    I require help with a very simple program which needs to remove the duplicate lines as well as other defined lines in a text file.

    The program will be run on a similar file like the one below:
    ...
  9. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Ah yes, I will include the sw.Close() statement within the try block.

    Thanks for the updated catch statement.

    Next question, If I wanted to display the results of the time difference so that...
  10. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Thanks guys. Is the following correct?

    So the bulk of the code is within the try block, this way all of the variables are in scope.

    Then the catch block wil handle any errors found in the try...
  11. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Hi, I have tried to encorporate try and catch blocks into my code as follows:




    try
    {
    string[] entries = File.ReadAllLines("J:\\sourceFile.txt");
    ...
  12. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Hi fcronin,

    Your solution worked a treat! Thanks.

    I have made some minor modifications in the way the time span is displayed but other than that the process is the same.

    One thing I have...
  13. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Hi,

    Thanks, this worked. I think I may have made a mistake and changed it. Sorry.

    I understand how this works but how would I get it to scan through my existing text file and apply the...
  14. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Hi,

    Thanks for your reply.

    To try and figure out how complete this, I first tried your code soI could understand the basis and work from there. However it did not work. The output is only the...
  15. Replies
    16
    Views
    2,874

    Re: Date and time difference in a text file

    Thanks very much for your reply and useful information.

    Yes you are correct, it is massive overkill to use .Net for this, however it needs to be programmed in C# .Net.
  16. Replies
    16
    Views
    2,874

    Date and time difference in a text file

    Hi,

    I am writing a simple program which reads through a text file and searches for a specific string. As it finds each instance of this string it needs to copy the date and time of the line (not...
Results 1 to 16 of 16





Click Here to Expand Forum to Full Width

Featured