Parse Excel File via PowerShell for a loop
Hello everyone,
I would like to parse a column of one of my Excel file to retrieve the string that each of its cell can contain.
This will be used to set the appropriate value of the UPN of users in a specific OU in Active Directory.
The first column being the SAMAccountName and the second column the email address, I would like a loop that for each match of SAMAccountName it finds in the first column, it sets the value of associated row in the second column as its UPN.
I know already the Active Directory cmdlets I would have to use, they works but I do not succeed retrieving data like I would like from the Excel file.
If someone could help me out on this that will be appreciated :)
Thanks a lot.
Hi,
This might help:
http://gallery.technet.microsoft.com/scriptcenter/7b2fdc8f-a528-4f19-b9ef-f5af349dc906
I haven't used this module myself, so I'm not sure how well it works.
Don't retire TechNet! -
(Don't give up yet - 12,700+ strong and growing)
Similar Messages
-
Removing non printable characters from an excel file using powershell
Hello,
anyone know how to remove non printable characters from an excel file using powershell?
thanks,
jose.To add - Excel is a binary file. It cannot be managed via external methods easily. You can write a macro that can do this. Post in the Excel forum and explain what you are seeing and get the MVPs there to show you how to use the macro facility
to edit cells. Outside of cell text "unprintable" characters are a normal part of Excel.
¯\_(ツ)_/¯ -
Date formatting issue when sending excel file via mail
hello People ,
I am facing date issue .
I have inetrnal format of date as yyyymmdd.
I am converting it into YYYY-MM-DD.
CONCATENATE gs_output-end_date(4)
gs_output-end_date+4(2)
gs_output-end_date+6(2)
INTO lv_date_to SEPARATED BY gc_seperator. " gc_separator = '-'.
gs_output-end_date = lv_date_to.
I am writing this date and sending an excel file via MAIL . I get date result as MM/DD/YYYY always.
Now if i pass in YYYY.MM.DD and used the same code where gc_separtor = '.'.
I get output as YYYY.MM.DD.
Can any one give me an idea why in format YYYY-MM-DD it is getting overwritten but for yyyy.mm.dd it gives me as yyyy.mm.dd?
Regards,
Abhi..
Edited by: Thomas Zloch on Jul 11, 2011 2:30 PM - subject enhancedThanks , Rohit ,
I have change my date format in SU01 settings .
It is now made to [ YYYY-MM-DD] but still '-' is replaced by MM/DD/YYYY.
Also note that when i format in the following way
CONCATENATE gs_output-rdadate(4)
gs_output-rdadate+4(2)
gs_output-rdadate+6(2)
INTO lv_rda_date.
instead of
CONCATENATE gs_output-rdadate(4)
gs_output-rdadate+4(2)
gs_output-rdadate+6(2)
INTO lv_rda_date sepearted by '-'.
I get output as YYYYMMDD.
Regards,
Abhishek. -
Scan a Excel file via power Shell
Hi;
I have in input a Excel File (3 colunms) to create automatically the sites collections (CS) and thier sites (SITES) :
INUPUT :
DECC CS SITES
dec1 paris site1
dec1 paris site2
dec1 paris site3
dec1 nice site1
dec1 nice site2
dec1 nimes site1
dec2 ales site1
dec2 ales site2
dec2 sete site1
etc...
How scan the Excel file via power shell to create the sites + collections in reading like this :
dec 1 -- paris
-- site1 & site2 & site3
-- nice
-- site1 & site 2
-- nimes
-- site1
dec 2 -- ales
-- site1 & site2
-- sete
-- site1
Regards;Hello soussou97,
My approach is to save the values of your first and second column (the columns you want to sort your values with) in ArrayLists and then use dynamic variables to save the actual content. Look at the following code. It should be able to display the information
you need.
#Specify the path of the excel file
$FilePath = 'Path\file.xlsx'
#Specify the Sheet name
$SheetName = "Sheet"
# Create an Object Excel.Application using Com interface
$objExcel = New-Object -ComObject Excel.Application
# Disable the 'visible' property so the document won't open in excel
$objExcel.Visible = $false
# Open the Excel file and save it in $WorkBook
$WorkBook = $objExcel.Workbooks.Open($FilePath)
# Load the WorkSheet 'BuildSpecs'
$WorkSheet = $objExcel.sheets.item($SheetName)
# I am taking row count as 2, because the first row in my case is header
$intRow = 2
[System.Collections.ArrayList]$farr = @()
[System.Collections.ArrayList]$sarr = @()
Do {
# Reading the first column of the current row
$First = $WorkSheet.Cells.Item($intRow, 1).Value()
# Reading the second column of the current row
$Second = $WorkSheet.Cells.Item($intRow, 2).Value()
# Reading the third column of the current row
$Third = $WorkSheet.Cells.Item($intRow, 3).Value()
"First: " + $First
"Second: " + $Second
"Third :" + $Third
if($farr -notcontains $First){
$farr.Add($First)
if($sarr -notcontains $Second){
$sarr.Add($Second)
$variable = Get-Variable -Name "$First-$Second" -Scope Global -ErrorAction SilentlyContinue
if ($variable -eq $null)
Write-Host "$First-$Second does not exist"
New-Variable -Name "$First-$Second" -Value $Third
else{
$val = Get-Variable -Name "$First-$Second" -ValueOnly
Set-Variable -Name "$First-$Second" -Value $val","$Third
$intRow++
}While ($WorkSheet.Cells.Item($intRow,1).Value() -ne $null)
foreach($dec in $farr){
foreach($city in $sarr){
$variable = Get-Variable -Name "$dec-$city" -Scope Global -ErrorAction SilentlyContinue
if ($variable -ne $null){
$dec+"--"+$city+"--"+$variable.Value;
my sample data looks like this
col1 | col2 | col3
abc | qwe | poi
abc | jhg | dfg
de | wer | rew
de | iuz | mnb
abc | qwe | iop
de | wer | asd
Regards,
Hristo Valev
Developer-Hotline for MSDN Online Germany
Disclaimer:
Please take into consideration, that further inquiries cannot or will be answered with delay.
For further information please contact us per telephone through the MSDN-Entwickler-Hotline:
http://www.msdn-online.de/Hotline
For this post by the MSDN-Entwickler-Hotline the following terms and conditions apply:
Trademarks,
Privacy
as well as the separate
terms of use for the MSDN-Entwickler-Hotline. -
Problem in Uploading excel file using WebDynpro for Java
Hi All
I have followed for Uploading excel file using WebDynpro for Java added by Tulasi Palnati
I done all, but I'm getting 500 Exception please contact u r system admin meag at run time also Jxl/Workbook class not found msag but i downloaded Jxl.jar file and there is no error signals in coding part. How can I solve the Problem.
Thanks
PolakaPlease ask the people in the Web Dynpro Java forum for a solution.
-
Hi,
I know the user can export an Excel file once the report viewer is loaded, but I was wondering if it's possible to generate an Excel file via code (no viewer loaded)?
thanks,
RonYup.
You can find export samples in our [Crystal Reports .NET SDK samples|https://www.sdn.sap.com/irj/boc/sdklibrary?rid=/library/uuid/d0bf8496-2a81-2b10-95ac-b1f48d5b63f5]
Jason -
Unable to edit Excel file via WebDAV in IE
LS,
Aim
To be able to open an Excel file in Oracle Portal via IE for editing (ergo, if changed it needs to be saved in the same location where it resides = database)
What have we done so far
OraDAV has been implemented (basic manner), a pagegroup has been created in Oracle Portal for security, next we stored some Excel files for test purposes.
Opening and editing using Windows Explorer (when testing) works fine, but opening from browser (Internet Explorer) opens Excel-file in read-only mode!
Workaround
Create windows shortcuts to Excel files in the OraDAV Webfolder, shortcuts are then placed in a public Windows-share which is running on a workstation.
Accessing these shortcuts from both Windows Explorer and Internet Explorer works fine then.
But...
Unfortunately, implementing a windows share on a server is considered to be not an option by the network security team, and it's also not an option to continue using a workstation for that purpose.
What does Metalink say (we created TAR for this)
CLARIFICATION
====================
This issue happens on WEBDAV.
Using=>Windows Explorer it works fine.
Using=>Internet Explorer it does not do as the customer aspected.
Webdav:
Using=>Windows Explorer
going to folder
http://<machine>:7778/dav_portal/.../QA1.XLS
double clicked QA1.XLS and this opens in Microsoft Excel.
After made modifications the file is saved correctly without any issue.
Using=>Internet Explorer
Calling the
URL:http://<machine>:7778/.../QA1.XLS
the file QA1.XLS opens within Internet Explorer the Microsoft Excel plugin.
Problem is it the file opened in read-only mode and when you click save it wants to save
in local drive.
ISSUE VERIFICATION
===================
Verified the issue by the OWC session.
RESEARCH
=========
TESTCASE
I have tested the same issue on 9.0.2.3 and 10.1.2 portal versions.
They are all behaving the same.
CAUSE DETERMINATION
====================
This is intended behaviour.
CAUSE JUSTIFICATION
====================
Details => http://www.webdav.org
http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/OTN_CONTENT/MAINPAGE/PUBLISH_CONTMGMT/TECHNOTE_WEBDAV.HTML
What does Portal documentation say
Source: Oracle9iAS Portal Release 2 âTechnical Overview
An Oracle White Paper; April 2002; Page 17
=======================================================
Integrating with the desktop
File-type item content can also be published to the portal repository via the Webbased Distributed Authoring and Versioning (WebDAV) protocol. Using a WebDAV client such as Windows Explorer, a portal page group can be mapped as a Web Folder. Users can then simply drag and drop content, files, and folders between portal pages and the desktop. File-type items can also be opened, edited, and saved directly from WebDAV desktop applications like MS Office 2000.
Thus...
Even though Metalink is implying it is not possible, one would think it IS possible, since IE is also a valid WebDAV client.
Bottom line
Does anyone know how to set up Portal in combination with WebDAV to ensure editing of Excel files will happen via Internet Explorer AND changes will be saved back onto the original location
Thanks, Patrickhi patrick,
this problem is not solvable on the serverside since this is a desktop integration problem. since you want to use excel as your editor you have to use excel's client side software.
oracle drive purely addresses desktop integration and is not meant to be a server side component. it is a webdav client and for that only ensures that the communication between the client and the portal server has as much useful functionality as possible.
the only other option that i see is downloading the document to the client, update it and copy it back up to the portal server, which is cumbersome.
all webdav clients are client side software that is either shipped with the OS (MS webfolders) or needs to be installed on the client (oracle drive).
you could check if there is software availble that is an excel plug-in for internet explorer which at the same time talks webdav to portal. not sure if this exists ?
regards,
christian -
"Open method of Workbooks class failed" when opening Excel file via Internet Explorer
(apologies, I posted this first to the general Office 2010 forum, but then realized this was probably a better spot to post)
We have an Excel COM add-in installed on users' PCs. This add-in responds to workbook open events by opening a particular XLA file (also deployed to the PC) to make certain features available. This process works flawlessly when Excel files are
opened locally - but when a user attempts to open an Excel file from an IE link, we get the following error: "Open method of Workbooks class failed". This is happening on the line that is trying to open the XLA file. This only happens
when launching an Excel link from IE - works fine in Chrome or Firefox.
I have found several posts on this topic, but no solutions:
1. This post (https://social.msdn.microsoft.com/forums/office/en-US/73c96005-84af-4648-b103-32b677205be3/open-method-of-workbooks-class-failed)
is the closest to our problem. In this case, the "answer" was that the user may not have access to the 2nd workbook being opened. But in our case, we're opening an XLA that is on the local machine, and I've confirmed that it is not
corrupt and accessible (read & write, just in case!) to Everyone.
2. This (very old) post (http://www.pcreview.co.uk/forums/open-method-workbooks-fails-excel-hosted-ie-t965608.html)
seems similar, but is talking about opening Excel inside of IE. This is not what we're doing - the link is supposed to (and does) open Excel outside of IE. Interestingly, Excel.exe is being launched with the "-embedded" flag, even
though it isn't running in the IE window. When launching Excel by opening the file locally, Excel.exe is run with the "/dde" flag instead. Clearly the "-embedded" mode is what is causing the problem. I could change the
links on the web page to use some JavaScript to open Excel differently... unfortunately, the links are actually generated by SharePoint (the Excel files are in a SP repository), so this is not really an option.
3. This Microsoft KB article (http://support.microsoft.com/kb/268016) talks about problems opening an XLA directly from IE... but this is the case of a link pointing
directly to an XLA file, not opening a regular workbook that in turn opens an XLA, as is my case. In fact, this article specifically points out in the "More Information" section that "End users do not normally open XLAs; instead they open
an XLS that (if needed) loads one or more XLAs during startup." ==> precisely what I'm trying to do that is giving me the error!
I've replicated the situation with a very simple COM add-in (created in VS2010 using VB.Net) and a very simple XLA file (does nothing, just pops up a message in auto_open). For anyone wanting to try it out, here is the exact test case:
1. In Excel, create a simple XLA file containing only the following code, and save it in C:\TEMP\dummy.xla:
Sub Auto_Open()
MsgBox "Auto Open fired"
End Sub
2. In Visual Studio, create a new Excel 2010 Add-In. I created mine via Visual Basic, but I doubt the choice of language matters. Place the following code in ThisAddin.vb:
Public Class ThisAddIn
Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
AddHandler Me.Application.WorkbookOpen, AddressOf Application_WorkbookOpen
End Sub
Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
End Sub
Sub Application_WorkbookOpen(ByVal workbook As Excel.Workbook)
On Error GoTo ErrHandler
If (Not workbook.Name.Contains("dummy.xla")) Then
MsgBox("Workbook open")
Application.Workbooks.Open("C:\temp\dummy.xla")
Application.Workbooks("dummy.xla").RunAutoMacros(Excel.XlRunAutoMacro.xlAutoOpen)
End If
Exit Sub
ErrHandler:
MsgBox(Err.Description)
End Sub
End Class
3. Build & publish this add-in and install it on the same machine as the XLA created in step 1.
4. Create and save an empty Excel workbook (I called mine WayneTest1.xlsx) - save it locally (on your desktop), and put a copy somewhere on your web server (I put mine directly in c:\inetpub).
5. Create an HTML file with a link to that workbook, saving it to the same web server location - here is mine:
<html>
<body>
<a href="WayneTest1.xlsx">Link to Excel file</a>
</body>
</html>
6. Double click the workbook on your desktop (from step 4) - opens fine, I get the "workbook open" message, following by the "Auto Open fired" message.
7. In Internet Explorer, navigate to the HTML file specified in step 5 and click on the link - when prompted, select "Open" - I get the "workbook open" message, following by the error message "Open method of Workbooks class failed".
Here are a few things I've ruled out / tried so far:
- Unchecked all the "Protected View" settings in Excel, made no difference
- Unchecked all the "File block settings" in Excel, made no difference
- Made sure dummy.xla was open for read & write to Everyone
- Made sure the web page was in Trusted sites and set the security level to Low for those sites in IE
- Tried making the local desktop file (step 6) readonly, made no difference (i.e. launching it locally still worked fine)
- Tried using Excel 2013 - made no difference
Any ideas / suggestions?Hello Wayne,
Apologies for the delay.
I went through your post and tried to reproduce the issue. I was able to reproduce it. Based
on its complexity and as it requires more in-depth analysis, your question falls into the paid support category which requires a more in-depth level of support.
Please visit the below link to see the various paid support options that are
available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
Thanks,
Anush -
How to Add Multiple Driver Packages Using Reference File via PowerShell
Hey All -
I've got a task I'm working on which would be much easier via PowerShell. I tried figuring it out, but couldn't so thought I'd post.
The Task
I need to create about 50 new, empty driver packages (most are in the same folder in the console) and am trying to find a method of doing so where I may use a source text file / csv file as reference in the command line. Each package has a unique name
and source path. Here are examples:
- Latitude E5440 Win7 x86 [A01] \\server\drivers\5440x86
- Latitude E5440 Win7 x64 [A01] \\server\drivers\5440x64
The Structure
All of the ones I want to add via PowerShell will go into the same folder in the console. They will be in the folder "root\New Drivers\Dell CAB Drivers"
Any ideas or will this just take more time than it's worth for 50? Thanks!
Ben K.Also, the creation of the driver package won't be your biggest challenge, as it's as simple as New-CMDriverPackage (see:
http://technet.microsoft.com/en-us/library/jj821724(v=sc.20).aspx).
The biggest challenge is relating your models to a share name (unless they're all Latitude).
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
How to get the content of a website to a txt file via powershell
Hello,
I have a reporting server that creates a report to a URL, by running multiple .xsl files. I want to be able to gather the data in the URL and convert it to csv or txt file via powrshell.
Again I want the data inside the URL, I've been playing around Net.Webclient but I'm not getting what I need.If you're using PowerShell 3.0 or later you can try using Invoke-WebRequest.
This previous thread shows how you can download the content from the page.
Without knowing what type of content (i.e. text vs images vs other objects) is on the page it's hard to say if this will work for you.
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights -
Remove various accepted domains (exchange 2007) from a list file via powershell
hello!
i'm a newbie with powershell and i'm trying to find if is it possible to remove a lot of exchange 2007 accepted domains from a csv file using powershell.
I want to delete accepted domains contained in a csv, it has only domains name and powershell requires the name , that is different from the domain.
example of accepted domain in my organization:
Name DomainName DomainType Default
Domain0001
domain1.com Authoritative False
Domain0002 hello1.com
Authoritative False
I've only a csv with domains name:
domain.csv:
Domain
domain1.com
hello1.com
Deleting an accepted domain via powershell requires the name so I need to extract first the name of , i've tried with this command and it works:
Get-AcceptedDomain | Where{$_.DomainName -eq 'domain1.com'}
This works only for 1 domain, I've a lot of domains to delete so it's inviable
Now, i'm trying to launch this command without success:
import-csv domain.csv | foreach {Get-AcceptedDomain | Where{$_.DomainName -eq '$_.Domain'}}
Probably there is a syntax error, or maybe I just can't do it.
Any help?
Many thanks in advance!!Don't know what to tell you, then. If I create a test file with that data, the Import-CSV works for me:
Domain
3414257440.domain.com
domain1.domain.com
'@ | set-content c:\testfiles\domain.csv
$DomainNames =
Import-CSV 'c:\testfiles\domain.csv' |
Select -ExpandProperty Domain
$DomainNames
3414257440.domain.com
domain1.domain.com
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " " -
Parse log file using powershell
Hi,
Am pretty new to Powershell and would require anyone of your assistance in setting up a script which parse thru a log file and provide me output for my requirements below.
I would like to parse the Main log file for Barra Aegis application(shown below) using powershell.
Main log = C:\BARRALIN\barralin.log
Model specific log = C:\BARRALIN\log\WG*.log
Requirements :
1. scroll to the bottom of the log file and look for name called "GL Daily" and see the latest date which in the example log below is "20150203"
note : Name "GL Daily" and date keep changing in log file
2. Once entry is found i would like to have a check to see all 3 entries PREPROCESS, TRANSFER, POSTPROCESS are sucess.
3. If all 3 are success i would like to the script to identify the respective Model specific log number and print it out.
E.g if you see the sample log below for "GL Daily", it is preceded by number "1718" hence script should append the model log path with "WG00" along with 1718, finally it should look something like this C:\BARRALIN\log\WG001718.log.
4. If all 3 items or anyone of them are in "failed" state then print the same log file info with WG001718.log
Any help on this would be much appreciated.
Thank You.
Main log file :
START BARRALINK Check Auto Update 1716
43006 20150203
Trgt/Arch c:\barralin
PREPROCESS success 0 preprocessor: no error
TRANSFER success 1 Host success: files received
POSTPROCESS success 0 Postprocessor: no error
CONFIRMATION success 2 No Confirm needed
STOP 43105 20150203
START Aegis GL Monthly
1716 43117 20150203
Trgt/Arch K:\barraeqr\aegis\qnt\gleqty
PREPROCESS success 0 preprocessor: no error
TRANSFER success 1 Host success: files received
POSTPROCESS success 0 Postprocessor: no error
CONFIRMATION success 2 No Confirm needed
STOP 44435 20150203
START Aegis UB Daily
1717 43107 20150203
Trgt/Arch K:\barraeqr\aegis\qnt\gleqty
PREPROCESS success 0 preprocessor: no error
TRANSFER success 1 Host success: files received
POSTPROCESS success 0 Postprocessor: no error
CONFIRMATION success 2 No Confirm needed
STOP 44435 20150203
START Aegis GL Daily
1718 44437 20150203
Trgt/Arch K:\barraeqr\aegis\qnt\gleqty
PREPROCESS success 0 preprocessor: no error
TRANSFER success 1 Host success: files received
POSTPROCESS success 0 Postprocessor: no error
CONFIRMATION success 2 No Confirm needed
STOP 50309 20150203
Hi All,
I was writing a function in power shell to send email and i was looking to attach lines as and when required to the body of the email. but am not able to get this done..Here's my code
Function Email ()
$MailMessage = New-Object System.Net.Mail.MailMessage
$SMTPClient = New-Object System.Net.Mail.SmtpClient -ArgumentList "mailhost.xxx.com"
$Recipient = "[email protected]"
If ($MessageBody -ne $null)
$MessageBody = "The details of Barra $strsessionProduct model is listed below
`rHostName : $localhost
`r Model Run Date : $Date
`r Model Data Date : $DateList1
`r`n Click for full job log"+ "\\"+$localhost+"\E$\Local\Scripts\Logs "
$MailMessage.Body = $MessageBody
If ($Subject -ne $null) {
$MailMessage.Subject = $Subject
$Sender = "[email protected]"
$MailMessage.Sender = $Sender
$MailMessage.From = $Sender
$MailMessage.to.Add($Recipient)
If ($AttachmentFile -ne $null) { $MailMessage.Attachments.add($AttachmentFile)}
$SMTPClient.Send($MailMessage)
$Subject = "Hello"
$AttachmentFile = ".\barralin.log"
$MessageBody = "Add this line to Body of email along with existing"
Email -Recipient "" -Subject $Subject -MessageBody $MessageBody -AttachmentFile $AttachmentFile
as you can see before calling Email function i did add some lines to $MessageBody and was expecting that it would print the lines for $MessageBody in Email Function along with the new line. But thats not the case.
I have tried to make $MessageBody as an Array and then add contents to array
$MessageBody += "Add this line to Body of email along with existing"
$MessageBody = $MessageBody | out-string
Even this didnt work for me. Please suggest me any other means to get this done.
THank You -
Exported files too large for email loop
I work with an online writers critique group. Since the most recent update, all files that I exported from Pages to Word to email to the loop have been rejected as being over 500KB.
While the critiqued documents are in Pages format, I see a Reduce File Size option in the dropdown menu. When I click it, I receive the message that all media files are at their optimum size.
Does anyone have a solution?I don't know of any way to reduce file sizes for Pages output other than to export them to PDF and then use Acrobat's file compression option to squeeze out the junk. There also are other apps out there for compressing PDFs. There are apps for converting PDFs to Word. However, I do not think the PDF loop will solve the problem. When the stuff comes back into Pages or Word, the overhead of these apps will be added to the text.
My suggestion is for your group to switch to Acobat PDF for review. We use Acrobat PDF files for reviewers. That way we do not have to worry about what word processing app a reviewer has installed, including on iPads and other tablets. Acrobat has extensive features for annotation and comment. And, Acrobat has excellent file comparison, which is character accruate.
I hop this is helpful. -
Is there any way to read the data from an excel file w/o using a loop structure?
I am retrieving a large amount of data (multiple sheets) from an excel file and would like to extract the entire range without retrieving individual cell values(too slow). I can write an range all at once but cannot read it.
If you are able to write a block of data, then you should be able to read a block. The four requirements that you want to verify are:
1. The Range specified must match the exact size and location of the data block you want to read
2. The returned data is in a 2D array of Variants (either strings or numbers)
3. Use Variant to Data to convert to 2D DBL or 2D Strings
4. Check for the correct orientation for your application (use transpose if it is not)
Michael Munroe
Certified LabVIEW Developer
www.abcdef.biz
Michael Munroe, ABCDEF
Certified LabVIEW Developer, MCP
Find and fix bad VI Properties with Property Inspector -
Understand further about "excel files is locked for editting by me"
Hi friends. I hope you are doing well.
i have a problem with an user in my office when opening an excel file from Server:
“<file_name>.xlsx is locked for editing” . The error shows that it is being used by its own user and that user could not open this file.
- Our company is domain network and our Domain Controller is also File Servers.
* I got a workaround action plan is: "unshared the folder which contains the problematic files in server, then share it again". However, this only works with folders which contain a small volume of data. For several GB it will take a considerable
time and affect to network availability.
I have few questions:
1. Is there anyway to kill the process/service which is controlling the "excel files" at server ? ( Since i reboot client machine but the error message still persists), beside my workaround action plan.
2.When i use OpenFilesView (from the link: http://www.nirsoft.net/utils/opened_files_view.html) i can see that the excel files is opened by 2 process : "xlsx and xls" from remote computer. However, i can not kill the process using OpenFilesView.
So i would like to ask: Is there any way to kill a process from remote host?
3. What actually happens when sharing a files from Server in domain ? ( mechanism of sharing files)
I would appreciate if you can give me some advices for my concern.
Thank you very much! Have a good day.Hi,
We have a lot of possible causes for this error, I would suggest your to take a look at this public blog and try the steps out there:
http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2012/05/14/the-definitive-locked-file-post.aspx
Also, below KB article describes the way that how Excel saves files, you might also want to take a look. There may be some softwares or process is accessing these temporary files. Check if there is any temporary file (~$filename.xls
or ~$filename.xlsx) in the shared folder, delete them and try again.
http://support.microsoft.com/kb/814068/en-us
Hope this helps.
Thanks,
Ethan Hua CHN
TechNet Community Support
Maybe you are looking for
-
Can I transfer an HD rental from my computer to an apple tv 3rd generation?
In the support documentation it clearly states that you can transfer SD content. It's not so clear about the HD movie rentals. You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it's a standard-definitio
-
Hi, Read the note 733287.1 and notice that the table HR_API_TRANSACTON_VALUES has been removed in R12. And the transaction data is keep in column TRANSACTION_DOCUMENT of HR_API_TRANSACTIONS table. We have several package that retrieve the PER_ABSENCE
-
I am unable to open my adobe files
I am trying to authorize my computer and keep receiving the following error, after I reset my password: Activation Servver error code: E_AUTH_NOT_READY Digital Editions encountered an error on the activation server. This is hindering me from studying
-
How to programmatically add af:setPropertyListener to CommandButton
I just read: https://blogs.oracle.com/jdevotnharvest/entry/creating_adf_faces_comamnd_button from Frank Nimphius. How do I programmatically add an af:setPropertyListener to the programmatically created command button? I just cannot seem to figure it
-
Multiple users in a class room enviroment / deleting home folders after use
Hi, I'm administrating a class room environment, where my students log on using Active Directory accounts. I would like to clean up the home folders after the users log out, so their profiles would be reseted when they log in next time. Is there any