Search Results

Search found 508 results on 21 pages for 'worksheet'.

Page 11/21 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to set the URL of a link to a variable using WATIR

    - by Alex
    Using WATIR and Excel, I'd like to take the first row of a table in Excel, visit the URL, then set the 12th link on the page as a variable in the cell next to the cell with the URL, then go to the next line and repeat. I'm stuck on getting the URL of the 12th link on the page to set as a variable that I can feed into the next cell in Excel. Here's what I have and it's not working. worksheet = workbook.WorkSheets(1) # get first workbook #declare test site test_site = worksheet.Range("a2").text #open ie ie = Watir::IE.new #go to test_site ie.goto test_site #find primlink ie.link(:index, 12).text = "primlink" puts primlink Any ideas?

    Read the article

  • Problem with skipping empty cells while importing data from .xlsx file in asp.net c# application

    - by Eedoh
    Hi to all. I have a problem with reading .xlsx files in asp.net mvc2.0 application, using c#. Problem occurs when reading empty cell from .xlsx file. My code simply skips this cell and reads the next one. For example, if the contents of .xlsx file are: FirstName LastName Age John 36 They will be read as: FirstName LastName Age John 36 Here's the code that does the reading. private string GetValue(Cell cell, SharedStringTablePart stringTablePart) { if (cell.ChildElements.Count == 0) return string.Empty; //get cell value string value = cell.ElementAt(0).InnerText;//CellValue.InnerText; //Look up real value from shared string table if ((cell.DataType != null) && (cell.DataType == CellValues.SharedString)) value = stringTablePart.SharedStringTable.ChildElements[Int32.Parse(value)].InnerText; return value; } private DataTable ExtractExcelSheetValuesToDataTable(string xlsxFilePath, string sheetName) { DataTable dt = new DataTable(); using (SpreadsheetDocument myWorkbook = SpreadsheetDocument.Open(xlsxFilePath, true)) { //Access the main Workbook part, which contains data WorkbookPart workbookPart = myWorkbook.WorkbookPart; WorksheetPart worksheetPart = null; if (!string.IsNullOrEmpty(sheetName)) { Sheet ss = workbookPart.Workbook.Descendants<Sheet>().Where(s => s.Name == sheetName).SingleOrDefault<Sheet>(); worksheetPart = (WorksheetPart)workbookPart.GetPartById(ss.Id); } else { worksheetPart = workbookPart.WorksheetParts.FirstOrDefault(); } SharedStringTablePart stringTablePart = workbookPart.SharedStringTablePart; if (worksheetPart != null) { Row lastRow = worksheetPart.Worksheet.Descendants<Row>().LastOrDefault(); Row firstRow = worksheetPart.Worksheet.Descendants<Row>().FirstOrDefault(); if (firstRow != null) { foreach (Cell c in firstRow.ChildElements) { string value = GetValue(c, stringTablePart); dt.Columns.Add(value); } } if (lastRow != null) { for (int i = 2; i <= lastRow.RowIndex; i++) { DataRow dr = dt.NewRow(); bool empty = true; Row row = worksheetPart.Worksheet.Descendants<Row>().Where(r => i == r.RowIndex).FirstOrDefault(); int j = 0; if (row != null) { foreach (Cell c in row.ChildElements) { //Get cell value string value = GetValue(c, stringTablePart); if (!string.IsNullOrEmpty(value) && value != "") empty = false; dr[j] = value; j++; if (j == dt.Columns.Count) break; } if (empty) break; dt.Rows.Add(dr); } } } } } return dt; }

    Read the article

  • Spreatsheet:WriteExcel create Chart

    - by yaohung
    Hi, I used csv2xls.pl to convert a text log into .xls file, and then apply create chart function as following: my $chart3 = $workbook-add_chart( type = 'line' , embedded = 1); Configure the series. $chart3-add_series( categories = '=Sheet1!$B$2:$B$64', values = '=Sheet1!$C$2:$C$64', name = 'Test data series 1', ); Add some labels. $chart3-set_title( name = 'Bridge Rate Analysis' ); $chart3-set_x_axis( name = 'Packet Size ' ); $chart3-set_y_axis( name = 'BVI Rate' ); Insert the chart into the main worksheet. $worksheet-insert_chart( 'G2', $chart3 ); ========== I can see the chart in .xls file, however, all the data is in text format, not number, therefore, the chart looks wrong. I am wondering can you tell me how to convert text into number before apply this create chart function? One other thing is any idea how to apply sorting on the .xls file before create chart? Thanks. Yaohung

    Read the article

  • Saving Excel Spreadsheet using Interop C#

    - by Wesley
    static void Main() { Application excelapp = new Application(); Workbook book = excelapp.Workbooks.Open(@"C:\HWYFAB.xlsx", 0, false, 5, "", "", false, XlPlatform.xlWindows , "", true, false, 0, true, false, false); Worksheet sheet = (Worksheet)book.Sheets[1]; Range cell = (Range)sheet.Cells[3, 2]; Console.WriteLine(cell.Text); cell.ClearContents(); book.Close(true, "HWYFAB.xlsx", false); excelapp.Quit(); } This program runs and exits as expected. It does print the correct value that's in cell B3 to the console. When closing it asks if I want to replace the existing file. I click yes. When I open the spreadsheet in Excel, the value is still in cell B3 despite the cell.ClearContents(). Any thoughts?

    Read the article

  • problem while converting object into datetime in c#

    - by Lalit
    Hi, I am getting string value in object let say "28/05/2010". While i am converting it in to DateTime it is throwing exception as : String was not recognized as a valid DateTime. The Code is: object obj = ((Excel.Range)worksheet.Cells[iRowindex, colIndex_q17]).Value2; Type type = obj.GetType(); string strDate3 = string.Empty; double dbl = 0.0; if (type == typeof(System.Double)) { dbl = Convert.ToDouble(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q17]).Value2); strDate3 = DateTime.FromOADate(dbl).ToShortDateString(); } else { DateTime dt = new DateTime().Date; //////////dt = DateTime.Parse(Convert.ToString(obj)); **dt = Convert.ToDateTime(obj).Date;** strDate3 = dt.ToShortDateString(); } The double star "**" line gets exception.

    Read the article

  • EXCEL - Locking a Cell from User input whilst allowing a Linked combobox?

    - by Christopher Leach
    I have a Protected Worksheet which is a checklist with a series of checkpoints. Each row has Item and Description cells that are locked. Each row has several columns with its contents to be set by a ComboBox and a text input column. Both i have left unlocked. I have Locked the the Item and Description columns and left only the 'Select Unlocked Cells' checked via Sheet Protection. I have one ComboBox on the worksheet that moves around and adjusts its LinkedCell and its Content list using the worksheets SelectionChanged event. When the user selects a cell to bring up the drop down list, the user is able to type into the cell and the Drop Down Box disappears. What is the best way to keep the cell unlocked so it can be selectable(as 'Select Locked Cells" is unchecked) however stop the user from being able to type in the cell and to allow the cells contents to become modifiable only via the ComboBox?

    Read the article

  • why this with excel sheet reading?

    - by Lalit
    Hi, I am reading the excel sheet from c# interop services cell by cell. where as my excel sheet have Date cells. It generates some double values , I am converting them in date by : double dbl = Convert.ToDouble(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q17]).Value2); string strDate3 = DateTime.FromOADate(dbl).ToShortDateString(); drRow[dtSourceEXLData.Columns[constants.VisualDate]] = strDate3; ok? but some time happening the value of ((Excel.Range)worksheet.Cells[iRowindex,colIndex_q17]).Value2 getting date formate.why this is happeing? plaease guide me. it throws excepion of "input string not in correct format".why it is not generating double value like other cell of same column?

    Read the article

  • Need a Concatenating VBA code to prevent memory issue workaround

    - by doharr
    My set up: Have 50,000 rows of data. ( My row count will increase in the future. So might as well say I have a full worksheet of 64000+ rows.) All Data is TEXT, no formulas, etc. Column A is open Columns B thru AC contain the Data that needs to be concatenated The Data in the rows once concatenated to Column A will contain 60,000 digits or 6kb in file size. After additional maniuplation each cell will become a file. I have tried concatenating in Excel and I run into memory issues. The memory issue is when I Select and fill down the concatenating function into the worksheet. It crashes at the 8200 +/-row. My system is 2gb of ram, windows xp professional and Excel 2003. Have 4GB of disk space Hoping to find a VBA code that will conserve memory, and not crash like it does in excel. Thank you

    Read the article

  • Trying to get excel 2003 into already made windows form

    - by Dcurvez
    good afternoon everyone :) I got sucha dilemma! (hate being new at stuff!) What my problem is is that I have a project that is in full design mode swing right now. I built it using the Windows form.. Anyways, on one of my forms..that I already started building (very painstakingly).. Minds have changed and now what needs to be on that form is either a full excel 2003 workbook..or at the very least..excel worksheet. The problem is that I have not been using studio 2008 for long..and coding experience shows the same. Can someone please tell me how the heck I can put a worksheet or a workbook on that form without starting my whole project over using office forms? Please..go slow with this newbie cuz i really dont know anything and Jargon is confusing me even more :( thanxxXXX :)

    Read the article

  • what is this value means 1.845E-07 in excel ?

    - by Lalit
    Hi , i am reading the excel sheet from c# by using interop services. My sheet have one of cell value as 0.00. but run time when i checking the value of that cell in c# code I am getting "1.845E-07" this value. When i check in excel sheet, on that cell right clicked , say format cell I got "1.845E-07" value in sample section. How to get exact value? Please help me. code is huge, so i can't provide it here . that line is: if (Convert.ToString(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q10]).Value2) != string.Empty) { drRow[dtSourceEXLData.Columns[constants.Floor]] = ((Excel.Range)worksheet.Cells[iRowindex, colIndex_q10]).Value2.ToString(); }

    Read the article

  • Parsing SQLIO Output to Excel Charts using Regex in PowerShell

    - by Jonathan Kehayias
    Today Joe Webb ( Blog | Twitter ) blogged about The Power of Regex in Powershell, and in his post he shows how to parse the SQL Server Error Log for events of interest.  At the end of his blog post Joe asked about other places where Regular Expressions have been useful in PowerShell so I thought I’d blog my script for parsing SQLIO output using Regex in PowerShell, to populate an Excel worksheet and build charts based on the results automatically. If you’ve never used SQLIO, Brent Ozar ( Blog...(read more)

    Read the article

  • Parsing SQLIO Output to Excel Charts using Regex in PowerShell

    - by Jonathan Kehayias
    Today Joe Webb ( Blog | Twitter ) blogged about The Power of Regex in Powershell, and in his post he shows how to parse the SQL Server Error Log for events of interest. At the end of his blog post Joe asked about other places where Regular Expressions have been useful in PowerShell so I thought I’d blog my script for parsing SQLIO output using Regex in PowerShell, to populate an Excel worksheet and build charts based on the results automatically. If you’ve never used SQLIO, Brent Ozar ( Blog | Twitter...(read more)

    Read the article

  • Top 10 Reasons SQL Developer is Perfect for Oracle Beginners

    - by thatjeffsmith
    Learning new technologies can be daunting. If you’ve never used a Mac before, you’ll probably be a bit baffled at first. But, you’re probably at least coming from a desktop computing background (Windows), so you common frame of reference. But what if you’re just now learning to use a relational database? Yes, you’ve played with Access a bit, but now your employer or college instructor has charged you with becoming proficient with Oracle database. Here’s 10 reasons why I think Oracle SQL Developer is the perfect vehicle to help get you started. 1. It’s free No need to break into one of these… No start-up costs, no need to wrangle budget dollars from your company. Students don’t have any money after books and lab fees anyway. And most employees don’t like having to ask for ‘special’ software anyway. So avoid all of that and make sure the free stuff doesn’t suit your needs first. Upgrades are available on a regular base, also at no cost, and support is freely available via our public forums. 2. It will run pretty much anywhere Windows – check. OSX (Apple) – check. Unix – check. Linux – check. No need to start up a windows VM to run your Windows-only software in your lab machine. 3. Anyone can install it There’s no installer, no registry to be updated, no admin privs to be obtained. If you can download and extract files to your machine or USB storage device, you can run it. You can be up and running with SQL Developer in under 5 minutes. Here’s a video tutorial to see how to get started. 4. It’s ubiquitous I admit it, I learned a new word yesterday and I wanted an excuse to use it. SQL Developer’s everywhere. It’s had over 2,500,000 downloads in the past year, and is the one of the most downloaded items from OTN. This means if you need help, there’s someone sitting nearby you that can assist, and since they’re in the same tool as you, they’ll be speaking the same language. 5. Simple User Interface Up-up-down-down-Left-right-left-right-A-B-A-B-START will get you 30 lives, but you already knew that, right? You connect, you see your objects, you click on your objects. Or, you can use the worksheet to write your queries and programs in. There’s only one toolbar, and just a few buttons. If you’re like me, video games became less fun when each button had 6 action items mapped to it. I just want the good ole ‘A’, ‘B’, ‘SELECT’, and ‘START’ controls. If you’re new to Oracle, you shouldn’t have the double-workload of learning a new complicated tool as well. 6. It’s not a ‘black box’ Click through your objects, but also get the SQL that drives the GUI As you use the wizards to accomplish tasks for you, you can view the SQL statement being generated on your behalf. Just because you have a GUI, doesn’t mean you’re ceding your responsibility to learn the underlying code that makes the database work. 7. It’s four tools in one It’s not just a query tool. Maybe you need to design a data model first? Or maybe you need to migrate your Sybase ASE database to Oracle for a new project? Or maybe you need to create some reports? SQL Developer does all of that. So once you get comfortable with one part of the tool, the others will be much easier to pick up as your needs change. 8. Great learning resources available Videos, blogs, hands-on learning labs – you name it, we got it. Why wait for someone to train you, when you can train yourself at your own pace? 9. You can use it to teach yourself SQL Instead of being faced with the white-screen-of-panic, you can visually build your queries by dragging and dropping tables and views into the Query Builder. Yes, ‘just like Access’ – only better. And as you build your query, toggle to the Worksheet panel and see the SQL statement. Again, SQL Developer is not a black box. If you prefer to learn by trial and error, the worksheet will attempt to suggest the next bit of your SQL statement with it’s completion insight feature. And if you have syntax errors, those will be highlighted – just like your misspelled words in your favorite word processor. 10. It scales to match your experience level You won’t be a n00b forever. In 6-8 months, when you’re ready to tackle something a bit more complicated, like XML DB or Oracle Spatial, the tool is already there waiting on you. No need to go out and find the ‘advanced’ tool. 11. Wait, you said this was a ‘Top 10′ list? Yes. Yes, I did. I’m using this ‘trick’ to get you to continue reading because I’m going to say something you might not want to hear. Are you ready? Tools won’t replace experience, failure, hard work, and training. Just because you have the keys to the car, doesn’t mean you’re ready to head out on the race track. While SQL Developer reduces the barriers to entry, it does not completely remove them. Many experienced folks simply do not like tools. Rather, they don’t like the people that pick up tools without the know-how to properly use them. If you don’t understand what ‘TRUNCATE’ means, don’t try it out. Try picking up a book first. Of course, it’s very nice to have your own sandbox to play in, so you don’t upset the other children. That’s why I really like our Dev Days Database Virtual Box image. It’s your own database to learn and experiment with.

    Read the article

  • Running Multiple Queries in Oracle SQL Developer

    - by thatjeffsmith
    There are two methods for running queries in SQL Developer: Run Statement Run Statement, Shift+Enter, F9, or this button Run Script No grids, just script (SQL*Plus like) ouput is fine, thank you very much! What’s the Difference? There are some obvious differences between the two features, the most obvious being the format of the output delivered. But there are some other, more subtle differences here, primarily around fetching. What is Fetch? After you run send your query to Oracle, it has to do 3 things: Parse Execute Fetch Technically it has to do at least 2 things, and sometimes only 1. But, to get the data back to the user, the fetch must occur. If you have a 10 row query or a 1,000,000 row query, this can mean 1 or many fetches in groups of records. Ok, before I went on the Fetch tangent, I said there were two ways to run statements in SQL Developer: Run Statement Run statement brings your query results to a grid with a single fetch. The user sees 50, 100, 500, etc rows come back, but SQL Developer and the database know that there are more rows waiting to be retrieved. The process on the server that was used to execute the query is still hanging around too. To alleviate this, increase your fetch size to 500. Every query ran will come back with the first 500 rows, and rows will be continued to be fetched in 500 row increments. You’ll then see most of your ad hoc queries complete with a single fetch. Scroll down, or hit Ctrl+End to force a full fetch and get all your rows back. Run Script Run Script runs the contents of the worksheet (or what’s highlighted) as a ‘script.’ What does that mean exactly? Think of this as being equivalent to running this in SQL*Plus: @my_script.sql; Each statement is executed. Also, ALL rows are fetched. So once it’s finished executing, there are no open cursors left around. The more obvious difference here is that the output comes back formatted as plain old text. Run one or more commands plus SQL*Plus commands like SET and SPOOL The Trick: Run Statement Works With Multiple Statements! It says ‘run statement,’ but if you select more than one with your mouse and hit the button – it will run each and throw the results to 1 grid for each statement. If you mouse hover over the Query Result panel tab, SQL Developer will tell you the query used to populate that grid. This will work regardless of what you have this preference set to: DATABASE – WORKSHEET – SHOW QUERY RESULTS IN NEW TABS Mind the fetch though! Close those cursors by bring back all the records or closing the grids when you’re done with them.

    Read the article

  • The Solution

    - by Patrick Liekhus
    So I recently attended a class about time management as well as read the book “The Seven Habits of Highly Effective People” by Stephen Covey.  Both have been instrumental in helping me get my priorities aligned as well as keep me focused. The reason I bring this up is that it gave me a great idea for a small application with which to create a great technical stack solution that would be easy to demo and explain.  Therefore, the project from this point forward with be the Liekhus.TimeTracker application which will bring some the time management skills that I have acquired into a technical implementation.  The idea is rather simple, but leverages some of the basic principles of Covey along with some of the worksheets that I garnered from class.  The basics are as such: 1) a plan is a must have and 2) write it down!  A plan not written down is just an idea.  How many times have you had an idea that didn’t materialize?  Exactly.  Hence why I am writing it all down now! The worksheet consists of a few simple columns that I will outline below as well as some modifications that I made according to the Covey habits.  The worksheet looks like the following: Status Issue Area CQ Notes P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   P  F  L     1234   The idea is really simple and straightforward; you write down all your tasks and keep track of them along the way.  The status stands for (P)ending, (F)inished or (L)ater.  You write a quick title for the issue and select the CQ (Covey Quadrant) with which the issue occurs.  The notes section is for things that happen while you are working through the issue.  And last, but not least, is the Area column that I added as a way to identify the Role or Area of your life that this task falls within based upon Covey’s teachings. The second part of this application is a simple phone log that allows you to track your phone conversations throughout the day.  All of this is currently done on a sheet of paper, but being involved in technology, I want it to have bells and whistles.  Therefore, this is my simple idea for a project that will allow me to test my theories about coding and implementations.  Stay tuned as the next session will be flushing out the concept and coming up with user stories to begin the SCRUM process. Thanks

    Read the article

  • WCF Routing Service Filter Generator

    - by Michael Stephenson
    Recently I've been working with the WCF routing service and in our case we were simply routing based on the SOAP Action. This is a pretty good approach for a standard redirection of the message when all messages matching a SOAP Action will go to the same endpoint. Using the SOAP Action also lets you be specific about which methods you expose via the router. One of the things which was a pain was the number of routing rules I needed to create because we were routing for a lot of different methods. I could have explored the option of using a regular expression to match the message to its routing but I wanted to be very specific about what's routed and not risk exposing methods I shouldn't via the router. I decided to put together a little spreadsheet so that I can generate part of the configuration I would need to put in the configuration file rather than have to type this by hand. To show how this works download the spreadsheet from the following url: https://s3.amazonaws.com/CSCBlogSamples/WCF+Routing+Generator.xlsx In the spreadsheet you will see that the squares in green are the ones which you need to amend. In the below picture you can see that you specify a prefix and suffix for the filter name. The core namespace from the web service your generating routing rules for and the WCF endpoint name which you want to route to. In column A you will see the green cells where you add the list of method names which you want to include routing rules for. The spreadsheet will workout what the full SOAP Action would be then the name you will use for that filter in your WCF Routing filters. In column D the spreadsheet will have generated the XML snippet which you can add to the routing filters section in your configuration file. In column E the spreadsheet will have created the XML snippet which you can add to the routing table to send messages matching each filter to the appropriate WCF client endpoint to forward the message to the required destination. Hopefully you can see that with this spreadsheet it would be very easy to produce accurate XML for the WCF Routing configuration if you had a large number of routing rules. If you had additional methods in other services you can simply copy the worksheet and add multiple copies to the Excel workbook. One worksheet per service would work well.

    Read the article

  • How to use a Macro command button in mac excel 2011

    - by user21255
    Im using Mac excel 2011 and I can't seem to get Macro to work. What I am trying to do is that in Worksheet (1st) I am trying to get all of the data entered in the Cases Table at the bottom to all be automatically inserted into the table in the "Cases" worksheet when I click on the "Update" button. But instead I keep getting a pop up saying runtime error and then it asks if I want to End, debug or something else. I just don't know if it is because I am not using Mac Excel correctly as I am used to using windows because I believe my code is correct in the VBA editor to get the button working. Anone who is able to use Mac excel 11 can they check to see if they can use the file provided to see i the button works? If anyone has windows excel then please feel free to check to see if it works on there as well. If it is a coding problem then can you please let me know. My question is simply how to run and stop a Macro in Mac excel 2011. The file can be accessed below: http://ge.tt/76qNwIx/v/0 Thanks

    Read the article

  • Two large, linked Excel files take 30 minutes to save, except in VMWare environment

    - by Gerald L
    I support some tax consultants who love to use Excel when they should probably be using Access. Anyway, they have created two Excel files, A and B. File B has cells linked to file A. File A is 27 MB and file B is 16 MB. One worksheet has roughly 1 million rows and there is another worksheet doing a whole bunch of SUMIF on the 1 million rows. Not the best idea, but whatever. Both Excel files open and recalculate within a reasonable amount of time (1-2 minutes). For a files that large, this is acceptable. Here is the problem: Once you change a cell, and save the file B, it takes a solid 30 minutes to save the file, and the processors are going full speed. I've tried this on 6 different machines, all running Windows XP SP3 with Office 2007 SP2 and all patches. The specs vary from one machine with 512 MB or RAM to a machine with 4 GB of RAM and quad processors. Same result every time. Here is the clincher: If I do this same save operation on a VMWare virtual machine, the file gets saved in 1 minute. I've tried this with my ESX servers at the office, my Mac Fusion at home, and VMWare workstation at the office. It does not matter how much RAM the virtual machine has... it saves in about 1 minute every time. Does anybody have any idea why this is happening and how to fix?

    Read the article

  • How to read cell data in excel and output to command prompt

    - by Max Ollerenshaw
    Hi All, I'm a sys admin and I am trying to learn how to use powershell... I have never done any type of scripting or coding before and I have been teaching myself online by learning from the technet script centre and online forums. What I am trying to accomplish is to open an excel spreadsheet get information from it (usernames and password) and then output it into the command prompt in powershell. When ever I try to do this I get an Exception calling "InvokeMember" anyway, here is the code I have so far: function Invoke([object]$m, [string]$method, $parameters) { $m.PSBase.GetType().InvokeMember( $method, [Reflection.BindingFlags]::InvokeMethod, $null, $m, $parameters,$ciUS ) } $ciUS = [System.Globalization.CultureInfo]'en-US' $objExcel = New-Object -comobject Excel.Application $objExcel.Visible = $False $objExcel.DisplayAlerts = $False $objWorkbook = Invoke $objExcel.Workbooks.Open "C:\PS\User Data.xls" Write-Host "Numer of worksheets: " $objWorkbook.Sheets.Count $objWorksheet = $objWorkbook.Worksheets.Item(1) Write-Host "Worksheet: " $objWorksheet.Name $Forename = $objWorksheet.Cells.Item(2,1).Text $Surname = $objWorksheet.Cells.Item(2,2).Text Write-Host "Forename: " $Forename Write-Host "Surname: " $Surname $objExcel.Quit() If (ps excel) { kill -name excel} I have read many different posts on forums and articles on how to try and get around the en-US problem but I cannot seem to get around it and hope that someone here can help! Here is the Exeption problem I mentioned: Exception calling "InvokeMember" with "6" argument(s): "Method 'System.Management.Automation.PSMethod.C:\PS\User Data.x ls' not found." At C:\PS\excel.ps1:3 char:33 + $m.PSBase.GetType().InvokeMember <<<< ( + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException Numer of worksheets: You cannot call a method on a null-valued expression. At C:\PS\excel.ps1:18 char:45 + $objWorksheet = $objWorkbook.Worksheets.Item <<<< (1) + CategoryInfo : InvalidOperation: (Item:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Worksheet: You cannot call a method on a null-valued expression. At C:\PS\excel.ps1:21 char:37 + $Forename = $objWorksheet.Cells.Item <<<< (2,1).Text + CategoryInfo : InvalidOperation: (Item:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\PS\excel.ps1:22 char:36 + $Surname = $objWorksheet.Cells.Item <<<< (2,2).Text + CategoryInfo : InvalidOperation: (Item:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Forename: Surname: This is the first question I have ever asked, try to be nice! :)) Many Thanks Max

    Read the article

  • Copy/paste filtered column in Excel - error message

    - by hazymat
    Firstly I should state that I don't believe in spreadsheets; my normal mode of operation is that data should either exist in a database or a text file... However - employment requires... In short, I have filtered a worksheet by column A, and I want to copy/paste from column B to column C. Obviously I don't wish to copy/paste values from rows that were filtered-out here. The above sounds ridiculously simple, right? First I tried simply copy/pasting on the filtered worksheet. This appeared to select and copy only the filtered data, however pasting appeared to insert values into hidden/filtered rows - as you might expect. So my initial research suggests I may wish to select the filtered data and press Alt+; (that is, ALT plus semicolon), which is a shortcut key for Goto Special Select Visible. Then just copy-paste. CTRL+C correctly copies the filtered data, however when I go to paste the values into another column, it pastes into hidden rows as well. Okay, so perhaps I should also "Select Visible" on the cells I wish to paste into as well? Nope - that gives me the error That command cannot be used on multiple selections. What am I doing wrong?!

    Read the article

  • Pivot table not refreshing sort order

    - by William Anthony
    I have Pivot Table that get its data source from another sheet, same workbook. I want the sort order of data is same as the data source order, I choose "Sort in data source order" in Pivot Table option. The problem is, when I change the data order on data source worksheet, then I refresh the Pivot Table, the sort order didn't change. I googled that the Pivot Table should be unlink first then re-link again in order to work properly, so I tried the following: The original data source has named range: origdata. The fake data source has names range: dummydata I changed manually data source to dummydata then changed back to origdata. The sort order did change as expected. Now I want to make the operation automated, so I'm using this code in Worksheet.activate event. Note that, PT is PivotTable instance. ... PT.SourceData = "dummydata" PT.RefreshTable PT.SourceData = "origdata" PT.RefreshTable ... Change data source from VBA didn't change the sort order just like I did with manual method. Why is that? Am I missing something? Maybe there are some routine called when I changed the data source manually via toolbar button? Thanks in advance for your help.

    Read the article

  • Excel hyperlinks can be attached to a range of cells -- what is the use case for this?

    - by John Machin
    In Excel 2003 and 2007 (and presumably 2010), it is possible to attach a hyperlink to a single cell; this is well known. Excel also allows you select a range for insertion. In that case, clicking on any cell in the range will jump to the target of the hyperlink. I can't find any web reference to this possibility. My question is: What is the use case for being able to do this? My only suggestion: The first worksheet is a menu for the remainder of the workbook. Each worksheet or topic has a hyperlink on the menu sheet. Each hyperlinks occupies a 3x3 range of cells to make it easier for users in a hurry to click on the correct link. A side question: Interestingly, Excel allows you to overlap ranges. Example: Link from A1:C3 to file1. Then link from B2:D4 to file2. The overlapped cells (B2:C3) now point to file2. Only A1, A2, A3, B1, and C1 now point to file1. No warning is given about the overlap. What is the rationale for this behaviour?

    Read the article

  • How can I create a macro that acts on a relative reference rather than an absolute reference to cell A1?

    - by Bruce
    I have a master rent statement in an Excel 2007 (macro enabled) spreadsheet that shows all tenants in rows with columns formed by the months. Each tenant then has a separate rent statement sheet like the one below that pulls the data through from the master rent statement and all I do then is to copy the last 4 columns to the right and add them to the right, just renaming the month labelled as ‘rent due’ with the current month and then hiding the previous last 4 columns to the left so that the statement always shows the previous month's activity and the amount due for the current month: I used a macro to speed up the creation of these statements, but then found that in some cases the result was wrong and needed major correction because the macro use absolute references i.e. its starting position was relative to cell A1 whereas some of my rent worksheets commence from a different column and in some cases from a different column and a different row. I have tried recording the macro with 'Use relative references' but when trying to use the macro it only gets part way through its operation before it stops and the message appears: Run time error '1004' Application defined or object defined error with the option to End or Debug or go to Help and then I'm stuck as I don't know how to debug and work in VBA or understand what has gone wrong. I want to record a single macro that always remains relative to the last 'Total Due' column heading (in the sample, it’s cell FF3 but on another worksheet could be cell GA26) and thus enables me regardless of where on the worksheet the rent statement is placed to add through my recorded macro a further four columns with updated dates and a repositioned 'Total Due' summary (in the sample in cells FE23 and FF23). The contents of cells FE23 and FE22 are always the same number of rows from the 'Sample Rent Statement, Service Charge and Sub Total' rows. I've searched on the web and in the help files of Excel 2007 but have been totally stumped by this, so currently I have to re-record a quantity of macros each month to cover all of the permutations of the worksheets in my Excel rent workbook, which is starting to become pointless in terms of saving time. Does someone know a solution to this problem please?!

    Read the article

  • DSOFramer closing Excel doc in another window. If unsaved data in file, dsoframer fails to open with

    - by Steve
    I'm using Microsoft's DSOFramer control to allow me to embed an Excel file in my dialog so the user can choose his sheet, then select his range of cells; it's used with an import button on my dialog. The problem is that when I call the DSOFramer's OPEN function, if I have Excel open in another window, it closes the Excel document (but leaves Excel running). If the document it tries to close has unsaved data, I get a dialog boxclosing Excel doc in another window. If unsaved data in file, dsoframer fails to open with a messagebox: "Attempt to access invalid address". I built the source, and stepped through, and its making a call in its CDsoDocObject::CreateFromFile function, calling BindToObject on an object of class IMoniker. The HR is 0x8001010a "The message filter indicated that the application is busy". On that failure, it tries to InstantiateDocObjectServer by classid of CLSID Microsoft Excel Worksheet... this fails with an HRESULT of 0x80040154 "Class not registered". The InstantiateDocObjectServer just calls CoCreateInstance on the classid, first with CLSCTX_LOCAL_SERVER, then (if that fails) with CLSCTX_INPROC_SERVER. I know DSOFramer is a popular sample project for embedding Office apps in various dialogs and forms. I'm hoping someone else has had this problem and might have some insight on how I can solve this. I really don't want it to close any other open Excel documents, and I really don't want it to error-out if it can't close the document due to unsaved data. Update 1: I've tried changing the classid that's passed in to "Excel.Application" (I know that class will resolve), but that didn't work. In CDsoDocObject, it tries to open key "HKEY_CLASSES_ROOT\CLSID{00024500-0000-0000-C000-000000000046}\DocObject", but fails. I've visually confirmed that the key is not present in my registry; The key is present for the guid, but there's no DocObject subkey. It then produces an error message box: "The associated COM server does not support ActiveX document embedding". I get similar (different key, of course) results when I try to use the Excel.Workbook programid. Update 2: I tried starting a 2nd instance of Excel, hoping that my automation would bind to it (being the most recently invoked) instead of the problem Excel instance, but it didn't seem to do that. Results were the same. My problem seems to have boiled down to this: I'm calling the BindToObject on an object of class IMoniker, and receiving 0x8001010A (RPC_E_SERVERCALL_RETRYLATER) "The message filter indicated that the application is busy". I've tried playing with the flags passed to the BindToObject (via the SetBindOptions), but nothing seems to make any difference. Update 3: It first tries to bind using an IMoniker class. If that fails, it calls CoCreateInstance for the clsid as a "fallback" method. This may work for other MS Office objects, but when it's Excel, the class is for the Worksheet. I modified the sample to CoCreateInstance _Application, then got the workbooks, then called the Workbooks::Open for the target file, which returns a Worksheet object. I then returned that pointer and merged back with the original sample code path. All working now.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >