Search Results

Search found 7183 results on 288 pages for 'export to excel'.

Page 66/288 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • FBX 3ds max export, bad vertices

    - by instancedName
    I need to import model in OpenGL via Fbx SdK, and for testing purposes I created a simple box centered in the (0, 0, 0), length 3, in 3ds max. Here's the image: But when i exported it, and imported in the OpenGL it wasn't in the center. Then I exported it in ASCII format, and opened the file in Notepad, and really Z coordinates were 0, and 3. When I converted model to editable mesh and checked every vertex in 3ds max it had expected (+-1.5, +-1.5, +-1.5) coordinates. Can anyone help me with this one? I'm really stuck. I tried to change whole bunch of parameters in 3ds max export, but every time it changes Z koordinate.

    Read the article

  • Using DLLEXPORT to export DLL function With Class to C#

    - by SICGames2013
    In my previous revision game engine I deported major functions for the game editor for C#. Now, I'm beginning to revise the game engine with a static library. There's a already dynamic library created in C++ to use DLLEXPORT for C#. Just now I want to test out the newer functions and created a DLL file from C++. Because the DLL contains classes I was wondering how would I be able to use DLL Export. Would I do this: [DLLEXPORT("GameEngine.dll", EntryPoint="SomeClass", Conventional=_stdcall)] static extern void functionFromClass(); I have a feeling it's probably DLLImport and not DLLExport. I was wondering how would I go about this? Another way I was thinking was because I already have the DLL in C++ prepared already to go the C# Class Library. I could just keep the new engine as a lib, and link the lib with the old DLL C++ file. Wouldn't the EntryPoint be able to point to the class the function is in?

    Read the article

  • Why does this exported cube have too many vertices?

    - by Joewsh
    I'm trying to export md5mesh models. Just as a test I decided to export a simple cube (i.e. with 8 vertices). When I opened the .md5mesh file it lists the following: numverts 24 numtris 12 numweights 24 Obviously the number of triangles makes sense: 6 faces * 2 to triangulate = 12. The model only has one bone so again it even makes sense that there is one weight for each vertex. The question is though, why is the file listing 24 vertices? Is the problem the exporter or is this normal for md5mesh's? Is it something that you have to rectify when you come to parsing the file in engine? I don't want to be parsing or drawing duplicated vertices without reason. I'm guessing it's something to do with shading and normals. Is it a case of listing each vert 3 times, one for each facing normal?

    Read the article

  • How to persistently export an environment variable before starting compiz

    - by Dykam
    A few months ago compiz suddenly stopped working. That is, it got to a refreshrate where the redrawing is more than noticeable. It took 5 seconds to redraw a chat window. Ever since I've been using metacity instead, but I've found myself missing some plugins badly. I found the following solution: export __GL_YIELD="NOTHING"; compiz --replace This works fine, everything is fast again with compiz. But how to make sure this variable is always set whenever I run compiz? I'm using standard nVidia drivers, failed to get the open source ones working.

    Read the article

  • Pass a range into a custom function from within a cell

    - by Luis
    Hi I'm using VBA in Excel and need to pass in the values from two ranges into a custom function from within a cell's formula. The function looks like this: Public Function multByElement(range1 As String, range2 As String) As Variant Dim arr1() As Variant, arr2() As Variant arr1 = Range(range1).value arr2 = Range(range2).value If UBound(arr1) = UBound(arr2) Then Dim arrayA() As Variant ReDim arrayA(LBound(arr1) To UBound(arr1)) For i = LBound(arr1) To UBound(arr1) arrayA(i) = arr1(i) * arr2(i) Next i multByElement = arrayA End If End Function As you can see, I'm trying to pass the string representation of the ranges. In the debugger I can see that they are properly passed in and the first visible problem occurs when it tries to read arr1(i) and shows as "subscript out of range". I have also tried passing in the range itself (ie range1 as Range...) but with no success. My best suspicion was that it has to do with the Active Sheet since it was called from a different sheet from the one with the formula (the sheet name is part of the string) but that was dispelled since I tried it both from within the same sheet and by specifying the sheet in the code. BTW, the formula in the cell looks like this: =AVERAGE(multByElement("A1:A3","B1:B3")) or =AVERAGE(multByElement("My Sheet1!A1:A3","My Sheet1!B1:B3")) for when I call it from a different sheet.

    Read the article

  • vba: what does ReDim Preserve do and simple array question

    - by every_answer_gets_a_point
    i am looking at someone else's vba excel code. they are doing ReDim Preserve dataMatrix(7, i) in both loops. what does this do? also, it seems like the second loop just overwrites the data in the first, loop, is that correct? Dim dataMatrix() As String Worksheets.Item("ETS").Select Do While Trim(Cells(r, 1)) <> "" Debug.Print "The line: ", Trim(Cells(r, 1)), r r = r + 1 dataMatrix(1, i) = Trim(Cells(r, 1)) ''file name dataMatrix(2, i) = Trim(Cells(r, 2)) ''sample type dataMatrix(3, i) = Trim(Cells(r, 3)) ''sample name dataMatrix(4, i) = "ETS" '' dataMatrix(5, i) = Trim(Cells(r, 5)) ''Response dataMatrix(6, i) = Trim(Cells(r, 6)) ''ISTD Response dataMatrix(7, i) = Trim(Cells(r, 10)) ''Calculated Conc i = i + 1 ReDim Preserve dataMatrix(7, i) Loop r = 5 Worksheets.Item("ETG").Select Do While Trim(Cells(r, 1)) <> "" Debug.Print "The line: ", Trim(Cells(r, 1)), r r = r + 1 dataMatrix(1, i) = Trim(Cells(r, 1)) ''file name dataMatrix(2, i) = Trim(Cells(r, 2)) ''sample type dataMatrix(3, i) = Trim(Cells(r, 3)) ''sample name dataMatrix(4, i) = "ETG" dataMatrix(5, i) = Trim(Cells(r, 5)) ''Response dataMatrix(6, i) = Trim(Cells(r, 6)) ''ISTD Response dataMatrix(7, i) = Trim(Cells(r, 10)) ''Calculated Conc i = i + 1 ReDim Preserve dataMatrix(7, i) Loop

    Read the article

  • How do I gather data from the same collumn in multiple worksheets in a single workbook?

    - by infiniteloop91
    Okay so here is what I want to accomplish. For this example I have a single workbook composed of 4 data sheets plus a totals sheet. Each of the 4 data sheets has a similar name following the same pattern where the only difference is the date. (Ex. 9854978_1009_US.txt, where 1009 is the date that changes while the rest of the file name is the same). In each of those documents column F contains a series of number that I would like to find the sum of but I will have no idea how many cells in F actually contain numbers. (However there will never be additional information below it the numbers so I could in theory just add the entire F column together). I will also add new files to the workbook over time and do not want to have to rewrite the code of which I gather my data from column F. Essentially what I would like to accomplish is for the 'totals' document to take every column F from documents in the workbook with the name of '9854978_????_US.txt', where the question marks change based on the file name. How would I go about doing this in pure Excel code?

    Read the article

  • Can't get findnext property of range class error

    - by Lawrence Knowlton
    I am trying to parse a report in Excel 2007. It is basically a report of accounting charge exceptions. The report has sections with a header for each type of exception. There are types of exceptions that are deleted from the report. I'm using a Do While loop to find each header and if the section needs to be deleted I have it do so. If nothing needs to be deleted the code works fine, but right after a section is deleted I get an "Unable to get the FindNext property of the Range Class" error. Here is my code: Sub merge_All_Section_Headers() ' Description: ' The next portion macro will find and format the Tranaction Source rows in the file ' by checking each row in column A for the following text: TRANSA. If a cell ' has this text in it, it is selected and a function called merge_text_cells ' is run, which performs concatenation of each Transaction Source header row and ' deletes the text from the rest of the cells with broken up text. ' lastRow = ActiveSheet.UsedRange.Rows.Count + 1 Range(lastRow & ":" & lastRow).Delete ActiveSheet.PageSetup.Orientation = xlLandscape With ActiveSheet.Range("A:A") Dim searchString As String searchString = "TRANSA" 'The following sets stringFound to either true or false based on whether or not 'the searchString (TRANSA) is found or not): Set stringFound = .Find(searchString, LookIn:=xlValues, lookat:=xlPart) If Not stringFound Is Nothing Then firstLocation = stringFound.Address Do stringFound.Select lastFound = stringFound.Address merge_Text_Cells If ((InStr(ActiveCell.Text, "CHARGE FILER") = 0) And _ (InStr(ActiveCell.Text, "CREDIT FILER") = 0) And _ (InStr(ActiveCell.Text, "PA MIDNIGHT FINAL") = 0) And _ (InStr(ActiveCell.Text, "BAD DEBT TURNOVER") = 0)) Then section_Del 'Function that deletes unwanted sections End If Range(lastFound).Select Set stringFound = .FindNext(stringFound) Loop While Not stringFound Is Nothing And stringFound.Address <> firstLocation End If End With Like I said it works fine when the section_Del is commented out. Any ideas as to how to remedy this would be greatly appreciated. Thanks!

    Read the article

  • Runtime Error 1004 using Select with several workbooks

    - by Johaen
    I have an Excel workbook which pulls out data from two other workbooks. Since the data changes hourly there is the possibility that this macro is used more than one time a day for the same data. So I just want to select all previous data to this date period and want to delete them. Later on the data will be copied in anyway. But as soon as I want to use WBSH.Range(Cells(j, "A"), Cells(lastRow - 1, "M")).Select the code stopes with Error 1004 Application-defined or object-defined error. Followed just a snippet of the code with the relevant part. What is wrong here? 'Set source workbook Dim currentWb As Workbook Set currentWb = ThisWorkbook Set WBSH = currentWb.Sheets("Tracking") 'Query which data from the tracking files shoud get pulled out to the file CheckDate = Application.InputBox(("From which date you want to get data?" & vbCrLf & "Format: yyyy/mm/dd "), "Tracking data", Format(Date - 1, "yyyy/mm/dd")) 'states the last entry which is done ; know where to start ; currentWb File With currentWb.Sheets("Tracking") lastRow = .Range("D" & .Rows.Count).End(xlUp).Row lastRow = lastRow + 1 End With 'just last 250 entries get checked since not so many entries are made in one week j = lastRow - 250 'Check if there is already data to the look up date in the analyses sheet and if so deletes these records Do j = j + 1 'Exit Sub if there is no data to compare to prevent overflow If WBSH.Cells(j + 1, "C").Value = "" Then Exit Do End If Loop While WBSH.Cells(j, "C").Value < CheckDate If j <> lastRow - 1 Then 'WBSH.Range(Cells(j, "A"), Cells(lastRow - 1, "M")).Select 'Selection.ClearContents End If Thank you!

    Read the article

  • How do I repeat function over several row.

    - by ChrisBD
    I'll admit that I'm not an Excel guru so maybe someone here can help me. On my worksheet I have several blocks of data. I calculate the sum of all items within column D of that block. Within each block I am checking the value of the cell in column C and if it contains the letter "y" and the value in column D of that row is equal to zero I must exclude the total sum of column D. Currently I am doing this by multiplying the sum value by either 1 or 0 which is produced by running a test over the cell contents. Below is an example of what I am using to test rows 23 to row 25 inclusively for data in Column D. I am also performing the same on Column E and G, but the "y" character is always in column C, hence the absolut column reference. =IF(AND($C23="y",D23=0),0,1)*IF(AND($C24="y",D24=0),0,1)*IF(AND($C25="y",D25=0),0,1) There must be a more efficient way to do this. Ideally I would like to write a function that I can paste into a cell and then select the rows or cells over which I run the test. Can anyone point me in the right direction?

    Read the article

  • How do I determine what Excel-2007 is removing when it repairs my file?

    - by sage
    Summary: Excel repairs my file, tells me what was removed, I go into the xml/zip structure to investigate, and I cannot figure out what was changed. Does anybody know what I can do to better understand what Excel changed? Is it futile to try to determine? It feels like this should be possible and like I'm almost there... Details: When I open a file that I have renamed unnamed.xlsm, I receive the following notice: "Excel found unreadable content in 'unnamed.xlsm'. Do you want to recover the contents of this workbook? If you trust the sounce of this workbook, click Yes." I know the file is safe, I click yes, and I receive a message that "Excel was able to open the file by repairing or removing the unreadable content." It provides the following summary, but also provides an xml file which seems to contain the same content so I did not show it. Summary: Removed Records: Shared formula from /xl/worksheets/sheet3.xml part Removed Records: Formula from /xl/calcChain.xml part (Calculation properties) In order to determine issue, I have created a copy of the offending file, renamed it to have a '.zip' ending, opened up the files that Excel says it modified (sheet3), and perused the xml content, but this was not informative. I tried saving the repaired file and doing a simple diff on the xml for sheet3, but there are many changes and this is not informative either. I did the same thing for calcChain.xml and this was more useful. After saving the displayed xml with line breaks in text format, it was easy to identify the items that have been removed, but now I want to make sense of them. Perhaps they give clues of what happened to shee3. The following comparison is long, but I don't know if the entire train of differences is relevant. FILE COMPARISON Produced: 1-7-2011 2:42:26 PM Mode: Just Differences Left file: u:\My Documents\[redacted]\calcChain_orig.xml Right file: u:\My Documents\[redacted]\calcChain_rep.xml 812 <c r="H18" i="8" /> <> 812 <c r="N2" i="8" /> 814 <c r="G18" /> +- 816 <c r="D19" /> +- 818 <c r="F19" /> +- 820 <c r="E18" /> +- 822 <c r="N2" i="8" /> +- 824 <c r="H18" /> +- -+ 820 <c r="H15" /> 821 <c r="H13" /> 822 <c r="O19" /> 823 <c r="O17" /> 824 <c r="O15" /> 825 <c r="M19" /> 826 <c r="M17" /> 827 <c r="M15" /> 828 <c r="M13" /> 829 <c r="J19" /> 830 <c r="J17" /> 831 <c r="J15" /> 832 <c r="J13" /> 833 <c r="O14" /> 834 <c r="H18" i="8" /> 835 <c r="G18" /> 836 <c r="D19" i="5" /> 837 <c r="F19" /> 838 <c r="E18" i="8" /> 839 <c r="H18" i="9" /> 827 <c r="H15" /> +- 829 <c r="H13" /> +- 831 <c r="O19" /> +- 833 <c r="O17" /> +- 835 <c r="O15" /> +- 837 <c r="M19" /> +- 839 <c r="M17" /> +- 841 <c r="M15" /> +- 843 <c r="M13" /> +- 845 <c r="J19" /> +- 847 <c r="J17" /> +- 849 <c r="J15" /> +- 851 <c r="J13" /> +- 853 <c r="O14" /> +- 1209 <c r="H48" /> +- 1210 <c r="H62" />

    Read the article

  • How does Microsoft Word And Excel Run without any installation?

    - by Sathya
    I was having a discussion on bookmarks in Word with a friend, and he suggested me to check out his implementation of a query in Word. Since I did not have Microsoft Word installed, I told him I don't have Word so I won't be able to test it. To this, he mentioned that he'll send the executables and it will work - I argued that without an installation this will fail. I was rather shocked when he sent me the standalone executables and on running them, Word actually launched and I was able to use almost every functionality o_0 How's this possible? I've never installed Microsoft Office on my system, this isn't any "portable" app or VMWare ThinStall ( thanks nhinkle, didn't know about this). There are absolutely no Microsoft Office related files - except for winword.exe and excel.exe. Curiously even Microsoft Excel works fine with just the standalone executable. winword.exe size is about 38 MB, and excel.exe size is just 35kb, which makes it even more strange. I'm running on Windows XP, the files were from Office 2003. I was discussing this on Chat prior to posting, here's the conversation

    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 to import this data set into excel? (column headings on each row delimited by a colon)

    - by Anonymous
    I'm trying to import the following data set into Excel. I've had no luck with the text import wizard. I'd like Excel to make id, name, street, etc the column names and insert each record onto a new row. , id: sdfg:435-345, name: Some Name, type: , street: Address Line 1, Some Place, postalcode: DN2 5FF, city: Cityhere, telephoneNumber: 01234 567890, mobileNumber: 01234 567890, faxNumber: /, url: http://www.website.co.uk, email: [email protected], remark: , geocode: 526.2456;-0.8520, category: some, more, info , id: sdfg:435-345f, name: Some Name, type: , street: Address Line 1, Some Place, postalcode: DN2 5FF, city: Cityhere, telephoneNumber: 01234 567890, mobileNumber: 01234 567890, faxNumber: /, url: http://www.website.co.uk, email: [email protected], remark: , geocode: 526.2456;-0.8520, category: some, more, info Is there any easy way to do this with Excel? I'm struggling to think of a way to convert this to a conventional CSV easily. As far as I can think, I'd have to remove the labels from each line, enclose each line in quotes, then delimit them with commas. Obviously that's made a little more difficult to script though seeing as some fields (address, for instance) contain comma-delimited data. I'm not good with regex at all. What's the best way to tackle this?

    Read the article

  • Sending formatted Lotus Notes rich text email from Excel VBA

    - by Lunatik
    I have little Lotus Script or Notes/Domino knowledge but I have a procedure, copied from somewhere a long time ago, that allows me to email through Notes from VBA. I normally only use this for internal notifications where the formatting hasn't really mattered. I now want to use this to send external emails to a client, and corporate types would rather the email complied with our style guide (a sans-serif typeface basically). I was about to tell them that the code only works with plain text, but then I noticed that the routine does reference some sort of CREATERICHTEXTITEM object. Does this mean I could apply some sort of formatting to the body text string after it has been passed to the mail routine? As well as upholding our precious brand values, this would be quite handy to me for highlighting certain passages in the email. I've had a dig about the 'net to see if this code could be adapted, but being unfamiliar with Notes' object model, and the fact that online Notes resources seem to mirror the application's own obtuseness, meant I didn't get very far. The code: Sub sendEmail(EmailSubject As String, EMailSendTo As String, EMailBody As String, MailServer as String) Dim objNotesSession As Object Dim objNotesMailFile As Object Dim objNotesDocument As Object Dim objNotesField As Object Dim sendmail As Boolean 'added for integration into reporting tool Dim dbString As String dbString = "mail\" & Application.UserName & ".nsf" On Error GoTo SendMailError 'Establish Connection to Notes Set objNotesSession = CreateObject("Notes.NotesSession") On Error Resume Next 'Establish Connection to Mail File Set objNotesMailFile = objNotesSession.GETDATABASE(MailServer, dbString) 'Open Mail objNotesMailFile.OPENMAIL On Error GoTo 0 'Create New Memo Set objNotesDocument = objNotesMailFile.createdocument Dim oWorkSpace As Object, oUIdoc As Object Set oWorkSpace = CreateObject("Notes.NotesUIWorkspace") Set oUIdoc = oWorkSpace.CurrentDocument 'Create 'Subject Field' Set objNotesField = objNotesDocument.APPENDITEMVALUE("Subject", EmailSubject) 'Create 'Send To' Field Set objNotesField = objNotesDocument.APPENDITEMVALUE("SendTo", EMailSendTo) 'Create 'Copy To' Field Set objNotesField = objNotesDocument.APPENDITEMVALUE("CopyTo", EMailCCTo) 'Create 'Blind Copy To' Field Set objNotesField = objNotesDocument.APPENDITEMVALUE("BlindCopyTo", EMailBCCTo) 'Create 'Body' of memo Set objNotesField = objNotesDocument.CREATERICHTEXTITEM("Body") With objNotesField .APPENDTEXT emailBody .ADDNEWLINE 1 End With 'Send the e-mail Call objNotesDocument.Save(True, False, False) objNotesDocument.SaveMessageOnSend = True 'objNotesDocument.Save objNotesDocument.Send (0) 'Release storage Set objNotesSession = Nothing Set objNotesMailFile = Nothing Set objNotesDocument = Nothing Set objNotesField = Nothing 'Set return code sendmail = True Exit Sub SendMailError: Dim Msg Msg = "Error # " & Str(Err.Number) & " was generated by " _ & Err.Source & Chr(13) & Err.Description MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext sendmail = False End Sub

    Read the article

  • Reading excel files with xlrd

    - by snurre
    I'm having problems reading .xls files written by a Perl script which I have no control over. The files contain some formatting and line breaks within cells. filename = '/home/shared/testfile.xls' book = xlrd.open_workbook(filename) sheet = book.sheet_by_index(0) for rowIndex in xrange(1, sheet.nrows): row = sheet.row(rowIndex) This is throwing the following error: _locate_stream(Workbook): seen 0 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 20 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 172480= 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 172500 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 2 172520 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 173840= 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 173860 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 173880 1 1 1 1 1 1 1 1 Traceback (most recent call last): File "/home/shared/xlrdtest.py", line 5, in <module> book = xlrd.open_workbook(filename) File "/usr/local/lib/python2.7/site-packages/xlrd/__init__.py", line 443, in open_workbook ragged_rows=ragged_rows, File "/usr/local/lib/python2.7/site-packages/xlrd/book.py", line 84, in open_workbook_xls ragged_rows=ragged_rows, File "/usr/local/lib/python2.7/site-packages/xlrd/book.py", line 616, in biff2_8_load self.mem, self.base, self.stream_len = cd.locate_named_stream(qname) File "/usr/local/lib/python2.7/site-packages/xlrd/compdoc.py", line 393, in locate_named_stream d.tot_size, qname, d.DID+6) File "/usr/local/lib/python2.7/site-packages/xlrd/compdoc.py", line 421, in _locate_stream raise CompDocError("%s corruption: seen[%d] == %d" % (qname, s, self.seen[s])) xlrd.compdoc.CompDocError: Workbook corruption: seen[2] == 4 I'm not able to find any info about CompDocError or Workbook corruption, even less the seen[2] == 4 part.

    Read the article

  • Excel formula for variable fields

    - by awais
    I am looking for a simple formula to do the calculation on two fields that are variable, for e.g., c1 has 100 and c3 has 150 and I want to calculate an increase/decrease percentage, but the trick is the cell values change every month. How do I put the formula to cater for such variation. Appreciate your help. Regards

    Read the article

  • Excel VBA Text To Column

    - by Pat
    This is what I currently have: H101 John Doe Jane Doe Jack Doe H102 John Smith Jane Smith Katie Smith Jack Smith And here is what I want: H101 John Doe H101 Jane Doe H101 Jack Doe H102 John Smith H102 Jane Smith H102 Katie Smith H102 Jack Smith Obviously I want to do this on a bigger scale. The number of columns is between 1 & 6, so I cant limit it that way. I was able to get a script that allows me to put each individual on one row. However, I am having a hard time getting the first column to copy over to each row. Sub ToOneColumn() Dim i As Long, k As Long, j As Integer Application.ScreenUpdating = False Columns(2).Insert i = 0 k = 1 While Not IsEmpty(Cells(k, 3)) j = 3 While Not IsEmpty(Cells(k, j)) i = i + 1 Cells(i, 1) = Cells(k, 1) //CODE IN QUESTION Cells(i, 2) = Cells(k, j) Cells(k, j).Clear j = j + 1 Wend k = k + 1 Wend Application.ScreenUpdating = True End Sub Like I said, it was working fine to get everyone each on their own row, but can't figure out how to get that first column. It seems like it should be so simple, but it's bugging me. Any help is greatly appreciated.

    Read the article

  • Weird Excel Formatting

    - by Gage
    Recently a new co-op was hired at our company and has been tasked to run a report. The report queries the database and returns a resultset and from there procedes to create the spreadsheets. Depending on the number of days selected a different number of reports are generated but I do not believe that is relavent to the question. Basically it runs the reports and loops through the resultset but at some point continues to loop through until tow 65536 at which it stops. For Example if the resultset contained 74 records then the first 74 rows would appear normally (formatted yellow) while everything after that would also be formatted yellow although it should be left alone. I am inheriting this code as I to am a new co-op. Apparently this only happens when a "change of guards" happens (New co-op has to run the report).` DoCmd.SetWarnings False DoCmd.OpenQuery ("DailySummaryQueryMain") strSQL = "SELECT * FROM DailySummaryMain" Set rs = CurrentDb.OpenRecordset(strSQL) DoCmd.Echo True, "Running first Report" If Not rs.EOF Then rs.MoveFirst Do While Not rs.EOF And Not rs.BOF xlapp.Range("A" & i).Value = rs.Fields(0).Value xlapp.Range("B" & i).Value = rs.Fields(1).Value xlapp.Range("C" & i).Value = rs.Fields(2).Value Set rs2 = CurrentDb.OpenRecordset("SELECT dbo_StatusType.StatusTypeID, dbo_StatusType.Name FROM dbo_StatusType WHERE (((dbo_StatusType.StatusTypeID)=" & rs.Fields(3) & "))") rs2.MoveFirst xlapp.Range("D" & i).Value = rs2.Fields(1).Value xlapp.Range("E" & i).Value = rs.Fields(4).Value xlapp.Range("F" & i).Value = rs.Fields(5).Value xlapp.Range("G" & i).Value = rs.Fields(6).Value 'count number of outages that start and end on same day If Format(xlapp.Range("F" & i).Value, "mm/dd/yyyy") = Format(xlapp.Range("G" & i).Value, "mm/dd/yyyy") Then dayCount = dayCount + 1 End If xlapp.Range("H" & i).Value = rs.Fields(7).Value xlapp.Range("I" & i).Value = rs.Fields(8).Value xlapp.Range("J" & i).Value = rs.Fields(9).Value xlapp.Range("K" & i).Value = rs.Fields(10).Value xlapp.Range("L" & i).Value = rs.Fields(11).Value xlapp.Range("M" & i).Value = rs.Fields(12).Value xlapp.Range("N" & i).Value = rs.Fields(13).Value 'highlite recently modified rows If rs.Fields(14).Value = "Yes" Then xlapp.Range("A" & i & ":N" & i).Select With xlapp.Selection.Interior .ColorIndex = 36 .Pattern = xlSolid End With End If 'break apart by sector If CInt(rs.Fields(2).Value) = 1 Then row = row1 ElseIf CInt(rs.Fields(2).Value) = 2 Then row = row2 ElseIf CInt(rs.Fields(2).Value) = 3 Then row = row3 Else row = row4 End If xlapp.Worksheets(CInt(rs.Fields(2).Value) + 1).Activate xlapp.Range("A" & row).Value = rs.Fields(0).Value xlapp.Range("B" & row).Value = rs.Fields(1).Value xlapp.Range("C" & row).Value = rs.Fields(13).Value xlapp.Range("D" & row).Value = rs.Fields(4).Value xlapp.Range("E" & row).Value = rs.Fields(5).Value xlapp.Range("F" & row).Value = rs.Fields(6).Value xlapp.Range("G" & row).Value = rs.Fields(7).Value xlapp.Range("H" & row).Value = rs.Fields(8).Value xlapp.Range("I" & row).Value = rs.Fields(9).Value xlapp.Range("J" & row).Value = rs.Fields(10).Value xlapp.Range("K" & row).Value = "" xlapp.Range("L" & row).Value = rs.Fields(11).Value xlapp.Range("M" & row).Value = rs.Fields(13).Value If CInt(rs.Fields(2).Value) = 1 Then row1 = row1 + 1 ElseIf CInt(rs.Fields(2).Value) = 2 Then row2 = row2 + 1 ElseIf CInt(rs.Fields(2).Value) = 3 Then row3 = row3 + 1 Else row4 = row4 + 1 End If 'activate main summary sheet for next outage xlapp.Worksheets(1).Activate i = i + 1 rs.MoveNext Loop` Also I should note that this is all happening within an access database which has its tables linked from SQL. The query is extremely slow to run from which I believe is the use of views but thats neither here nor there. All you have to know is attempting to debug takes an enormous amount of time due to having to wait for the recordset to return. My guess is that its not checking to see if the resultset is empty correctly. Is there a way I could check to see if theres a value is rs.Fields(0) and base it off that maybe? That is the ID column and there should always be a value. I am wondering why rs.EOF isn't catching this though.

    Read the article

  • Copying Excel Worksheets in POI

    - by Patrick Nichols
    Does anyone know of a means to copy a worksheet from one workbook to another using POI? The Workbook class has a cloneSheet method, but there doesn't seem to be able to insert a cloned sheet into a new workbook? If there isn't an API to do this easily, does anyone have the code to copy all of the data (styles, column widths, data, etc) from one sheet to another? The jxls has methods to copy sheets, but they don't work when copying between workbooks.

    Read the article

  • Creating an excel macro to sum lines with duplicate values

    - by john
    I need a macro to look at the list of data below, provide a number of instances it appears and sum the value of each of them. I know a pivot table or series of forumlas could work but i'm doing this for a coworker and it has to be a 'one click here' kinda deal. The data is as follows. A B Smith 200.00 Dean 100.00 Smith 100.00 Smith 50.00 Wilson 25.00 Dean 25.00 Barry 100.00 The end result would look like this Smith 3 350.00 Dean 2 125.00 Wilson 1 25.00 Barry 1 100.00 Thanks in advance for any help you can offer!

    Read the article

  • decrypt excel files

    - by locojay
    Hi I have 1000 encrypted workbooks which I would like to decrypt by providing a pwd. I could not find a decrypt method under apache poi or python's xlrd module. Does anyone know a library which could handle this (wbc.decrypt(pwd)). I would prefer a lib i could you use from a unix box. Thanks

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >