Manipulate Data In Worksheets?
Aug 24, 2009
Is it possible to manipulate data in worksheets?[code]...
what i want to do is round off the time in if the time is greater than 6:00 example please look at the data date 8/2 and 8/3. i would like to modify it and make the 6:01 to 6:15, and 6:16 to 6:30 , every 1-15min late the time would round off to the nearest 15mins.. my question is how can i make loop in the column "time in" and every time the program sees a "late IN" it will round it up to the nearest 15mins.
View 2 Replies
ADVERTISEMENT
May 8, 2010
I'm trying to delete worksheets that contain PX in their name and leave the worksheets with EQ alone.
View 2 Replies
Sep 16, 2011
I've got a tough one today and need a lot of with it. I hope someone out there has some experience in a manufacturing environment or at least point me to somewhere that will have an answer. So, the company I work for has RS 5000 (also have RS Linx) by Rockwell Automation. I need to record process test values to a file on a server and then use VB to manipulate that data. First off, I am trying to figure out how to get the data off of the PLC Can I export data to a file or do I have to retrieve data from a processor?
View 10 Replies
Feb 4, 2010
i want to import data about cigarettes from the internet. i don't know terminology so i'm having a hard time starting.
View 1 Replies
Aug 9, 2011
The DB has a field "end date" and 1753/1/1 is supposed to be the value representing nothing, as we cannot assign null to datatime in sql server..
In reporting application the select querry used, gets the data including those 1753 date values. good
Problem 1753 date causes hell with report calculations. there are a lot of calculations in the report and changing the code to ignore 1753 will be a headache, so i was thinking Is there a way to tell sql server,
SELECT *
FROM TABLE BUT IN END_DATE
WHERE VALUE='1753/1/1 01:00:00.000' REPLACE WITH PARAMETER1
CRUDE EDIT (donot have access to debugger currently)
i cannot remember but i get an error like "nothing should be mapped on something" when i insert record with null date! THIS HAPPENS ONLY WHEN USING VB.NET in csharp it works fine. do you know why??
View 5 Replies
Mar 4, 2009
I have an excel sheet that contains 25000 phone numbers listed in one cell with no sorting order. I want to create a small windows application that can read the sheet and return the total number of the phone numbers and how many duplicate numbers as well as the number of times of repetitions. How I can resolve this issue? What is the best way to approach it? I'm using VS 2008 and VB.Net.
View 14 Replies
Nov 8, 2009
Basically I want to know how to access a particular website from my application. I have used System.Net Namespace to request HTML from a website, It returns a complete HTML code which is used by Browsers to render the content on the screen but what i want is to interact with the website only without the use of a browser. I currently dont know how to do that.
I have a application which displays a Image when a user enters a keyword, lets say user enters a word "Envelope", the application will go to Google Images and search for this keyword. Now google returns images as results, the application now needs to download the first result ( which is a image) and display it on a form ). Everything here is done without a browser but via my application.
View 2 Replies
Jan 16, 2010
I'm trying to retrieve data from an Access database - a simple one. (Just a single table with one column) My task is to view these records through a 'ListView'. No need to manipulate or anything. Just to retrieve data with a simple SQL statement and display via a ListView.
View 4 Replies
Jan 22, 2009
I have VS 2005 installed in my sytem fyi.We have two databases, say source database and destination database. The databases is in Oracle. Now we need to pull data from Source database, manipulate it and push it into the destination database on daily basis.We are planning to use VB .Net for this and would like to know if this is feasible. Using windows forms through VB .NET, is it possible to create a exe and schedule the exe on nightly basis to pull the data from source to destination.how to do this as for manipulation of data, there is no intermediate database for us?
View 1 Replies
Nov 24, 2010
I have a csv file that needs to be automatically updated on a daily basis. I am writing a vb.net app to accomplish this. However, Im having issues with the entire process.I need to be able to read in a csv file, manipulate the data and then update the existing file. I have dabbled with using the Excel objects but I need some assistance.
View 6 Replies
Feb 3, 2010
So i am trying to add new worksheets to excel...not a problem there, but then I had a thought: What I really need is the proper code to add new worksheets on open that are named all of the dates in the current month minus saturday and sunday dates. That is what started to throw me for a loop. so i started with
set
newsheet = worksheets.add
newsheet.name = date
$
View 2 Replies
Jun 18, 2012
I'm trying to get the first row in each worksheet to be shaded and have the font bold. Right now, I am able to get the first worksheet changes made, but none of the other worksheets within the same workbook are being changed. Here is what I have written so far for creating the spreadsheet and applying a format.Public Function WRITE_TO_EXCEL(ByVal dt As System.Data.DataTable, ByVal includeheader As Boolean, ByVal worksheet_index As Integer) As Integer
[code]...
View 1 Replies
Mar 6, 2012
I have an issue where I need to load a fixed-length file. Process some of the fields, generate a few others, and finally output a new file. The difficult part is that the file is of part numbers and some of the products are superceded by other products (which can also be superceded). What I need to do is follow the superceded trail to get information I need to replace some of the fields in the row I am looking at. So how can I best handle about 200000 lines from a file and the need to move up and down within the given products? I thought about using a collection to hold the data or a dataset, but I just don't think this is the right way.[code]....
View 1 Replies
Jan 15, 2010
Just started VB programming this week and have found a wealth of information about what I'm trying to do. Problem is, some of it is more complete than others.Here's what I'm trying to do:In Form1 (my main form), I want to instantiate a class that contains a couple of properties (speed setpoint and position setpoint). When I click a button, I want to pass this data to Form2 and populate two textboxes on Form2 with the properties of this object. I want to manipulate the property values on Form2 and click an OK button which closes the dialog and returns the manipulated data, updating the property values of the object. Here's the algorithm I'm following:1) On Form1, instantiate the class2) On Form1's "Pass Data" button click event handler, instantiate a Form2 object and invoke the ShowDialog method, passing the object as a parameter.
3) On Form2, overload the ShowDialog method to accept the object as a parameter and modify the method so that it returns the manipulated class data.4) On Form2, in the ShowDialog method, populate the textboxes with the class data that was passed in.Here's where I get stuck. If I press the OK button on Form2 (DialogResult.OK), it returns me to Form1, but what hook do I have in Form1 to receive the manipulated class data that the ShowDialog method is returning?Here's an example of what I'm thinking about:
Code:
Public Class Form1
Dim clsController1 As New MotionController
[code].....
I'm sure it's probably a very elementary question, but every explanation I've found seems to be incomplete.
View 2 Replies
May 10, 2010
I wrote code that creates an Excel workbook wit a single worksheet (see below). How can I update this to add multiple worksheets to the workbook?
''' <summary>
''' Create a new XLS Excel spreadsheet based on a passed CSV (comma separated values) file.
''' </summary>
[code].....
View 6 Replies
May 8, 2009
I have a bunch of Excel workbooks that contain multiple worksheets. I want to loop through each workbook and export each worksheet into it's own new workbook. I want one worksheet in each new workbook.
Here's what I've got so far:
Sub ExportWorksheet(ByVal worksheet As Excel.Worksheet, ByVal filePath As String)
Dim xlApp As Excel.Application = New Excel.ApplicationClass
Dim xlWorkBook As Excel.Workbook = xlApp.Workbooks.Add
worksheet.Select()
worksheet.Copy()
[Code] .....
View 2 Replies
Jan 21, 2010
I'm trying to delete all the worksheets contained in a workbook using the code below but I get this error:
"Attempting to call into managed code without transitioning out first. Do not attempt to run managed code inside low-level native extensibility points, such as the vectored exception handler, since doing so can cause corruption and data loss."
For Each obj In xlWorkBook.Worksheets
xlWorkBook.Worksheets(obj.Name).delete()
Next
I tried to do this a different way yesterday and it told me I couldn't have a workbook with no worksheets. Is this written in stone or can it be done?
View 2 Replies
Jan 18, 2010
In VB 2008, I am trying to create an app that will copy a range of cells from one worksheet ("xlWS1") in the first workbook ("xlWB1") to another worksheet ("2") in a second workbook ("xlWB2"), starting in cell A1. I would like this to be activated by a button.Then, another button will copy the same cells from "xlWS1" to "xlWB2", worksheet "3", and so on for each subsequent button.
xlWB1/xlWS1 contains data in the cells that is updated from our data acquisition system once per second. (we perform jet engine testing). "xlWB2" sheets (6 of them) will contain the saved data from the "live" screen (xlWS1, came cell range) in the first WB. There are several different versions (filenames) of the second workbook, one for each engine model.Both workbooks should already be open, but I would also like the app to open them if they are not open already.
We have been using VBA macros to do this, but run into problems when someone saves the second (destination) workbook under a different filename. For some reason, if the filename of the Wb that is already open isn't the same as what's in the macro for that button, the macro's defined workbook is renamed in the macro. I am trying to get away from using the macros to keep this from happening, and to make an app that's "foolproof" so it is more reliable.
I already have an app that will open the proper workbooks. I may combine the two apps in the future. I can't find a solution for this. The VBA code is quite different and simple as far as opening, activating, copying, etc. Basically, I can't seem to find any self-explanatory "activate/copy/paste, etc." namespace in Vb 2008 like I used in the VBA macros.
I'm sure the solution is simple, but I just can't seem to find it in the MSDN library or the VS 2008 book I have. Everything in the book talks about accessing databases, which we don't use (yet). There's nothing concerning this issue with Excel 2003 workbooks/worksheets.
View 10 Replies
Sep 8, 2011
I'm trying to generate Office 2010 files (xlsx) in a vb.net project (Visual Studio 2010 fw 4.0).On my developing PC it works. Once on the server it generates an error:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).On the server I tried with dcomcnfg and navigate to DCOM Config and locate Excel. To solve the problem I would have chosen Customize in the Security tab under Launch and Activation Permissions and add the account under which the site is running (our server task user) and assign Local Launch & Local Activation permissions.[code]
View 2 Replies
Nov 20, 2009
While I have no problem to to program the output of two queries into 2 separate Excel workbooks and worksheets via
DoCmd.OutputTo acOutputQuery, "QueryA", acFormatXLS, "filenameQueryA", True
DoCmd.OutputTo acOutputQuery, "QueryB", acFormatXLS, "filenameQueryB", True
I have tried without success to find the right VBA commands within MS Access to create and save only one file with two worksheets, one for each query.
View 2 Replies
Jun 18, 2009
I want to write an Excel macro to set print formats in all worksheets in a workbook. I don't think you can do this by grouping; it appears you have to do it in each individual worksheet. I want to be able to run a macro in any workbook to loop through all worksheets in the workbook and then select the first worksheet.
How do you have the macro determine how many worksheets there are and set the loop counter equal to that number?
View 5 Replies
Apr 22, 2009
I've created a two-worksheet template in Excel - the first sheet is for pretty charts, and the other sheet is for the data that drives those charts. I've written a vb.net 2005 app that can dump in all my data on the second worksheet, and the chart worksheet updates perfectly.I would like to do this report several times over in the same workbook. (So the tabs would read 'Person1 - Chart', 'Person1 - Data', 'Person2 - Chart', 'Person2 - Data', etc.)
My solution was to, for every person this report was going to be run for, copy the chart template, and then copy the data template. The problem is that every chart template that is created points to the original data worksheet. How can I set what worksheet each chart worksheet is pointing at?
View 3 Replies
Dec 12, 2009
I have been looking for a good Example of Code to Compare 2 worksheets in the Same work book I have not had much luck. The Goal when complete is to compare Sheet 1 to Sheet 2 Then the Difference Recorded on Sheet 3 as a complete row with a date Stamp in A . If it is just a change then it is color coated Orange. If total new entry that was not on the sheet then it would be green If a Row is deleted in would be Pink.
View 7 Replies
Dec 23, 2009
I have 2 workbooks( Book1 and Book2) with multiple sheets.I am only interested in one of the worksheets in the workbooks(both the worksheets names are the same).The thing is that the data is in the form of pivot tables, so each time i have to filter according to specific categories, copy and paste into another new workbook.The thing is column headings in both the worksheets are different,BUT BOTH the worksheets data must be combined into 1 single worksheet( row after row).
Meaning in Book1, my columns are in the form of Cost, revenue,margin and in book2, the columns are in the form of Cost,Revenue, Profit Margin %.... That means i must add a profit margin % column in Book1 and a Margin column in Book2 before I combine the data into a single worksheet. Each week, new data gets added into Book1 and Book2, so I wish to automate this by creating a code, so that when the source data changes, my new workbook's data also changes.
View 1 Replies
Jan 31, 2012
i have problem in manipulating DataSet, how can i filter rows without getting the whole records in tables.
[Code]...
View 1 Replies
Feb 8, 2012
Private sub updatelabels()
If me.invokerequired then 'entire form -- ok ?
me.invoke (new methodinvoker (addressof updatelabels))
[code].....
View 3 Replies
Oct 1, 2010
I have a form with a bunch of tabs on it, but I don't want them to all be visible all the time.[code]...
View 4 Replies
Jul 9, 2009
I am developing an intranet app (so security isn't such a problem). The client wants to drag eml files from Outlook to a folder. I would like put a file watcher control that monitors the folder. When the new file is added I want to run some javascript in the open intranet window. How can the file watcher app communicate with the intranet app (also there may be more than one intranet app open). I am experienced at asp.net but a total novice to Winforms so bear with me.
View 4 Replies
Aug 8, 2010
I don't know much about the CIL, except that there is metadata in assemblies that record the type information.Would it be possible to create some reflecting tool that is able to read a C# or VB.NET assembly and change its metadata so that all class members become public?
View 4 Replies
Apr 11, 2012
I need to create a code, that allows me manipulate a scanner for to do the functions of scanning and save the image.
View 1 Replies