Category: News
Resolving array indices must be positive integers or logical values error?
I am running this piece of code:
fold_name=pwd; a=regexp(fold_name,’/’); fold_name=fold_name(a(end)+1:end);
my pwd is the following: ‘C:testsamples’
when running the first two pieces of code, I do not get any error. When running the third piece I get this error:
"Array indices must be positive integers or logical values."
Any ideas as to why?I am running this piece of code:
fold_name=pwd; a=regexp(fold_name,’/’); fold_name=fold_name(a(end)+1:end);
my pwd is the following: ‘C:testsamples’
when running the first two pieces of code, I do not get any error. When running the third piece I get this error:
"Array indices must be positive integers or logical values."
Any ideas as to why? I am running this piece of code:
fold_name=pwd; a=regexp(fold_name,’/’); fold_name=fold_name(a(end)+1:end);
my pwd is the following: ‘C:testsamples’
when running the first two pieces of code, I do not get any error. When running the third piece I get this error:
"Array indices must be positive integers or logical values."
Any ideas as to why? matlab, array MATLAB Answers — New Questions
Betweenness Centrality for a vertices in an adjacency matrix
Hello,
I’m trying to calculate the betweenness centrality for all nodes in an adjacency matrix. It is a weighted network. As far as I know, the Input should be the distance matrix which I have obtained from the adjacency matrix.
Then, I found the following code:
http://www.mathworks.com/matlabcentral/fileexchange/10922-matlabbgl/content/matlab_bgl/betweenness_centrality.m
I’m not 100% sure, but I think that this is my solution. However, I’m still new to MatLab and can’t get the code running.
I read some questions about varargin, but I still don’t know what I need to put in here and what is meant by "set_matlab_bgl_options
% for the standard options."
Any help is highly appreciated. I’m currently writing my thesis and desperately need betweenness scores for my network 🙂
Thanks a lot!!!Hello,
I’m trying to calculate the betweenness centrality for all nodes in an adjacency matrix. It is a weighted network. As far as I know, the Input should be the distance matrix which I have obtained from the adjacency matrix.
Then, I found the following code:
http://www.mathworks.com/matlabcentral/fileexchange/10922-matlabbgl/content/matlab_bgl/betweenness_centrality.m
I’m not 100% sure, but I think that this is my solution. However, I’m still new to MatLab and can’t get the code running.
I read some questions about varargin, but I still don’t know what I need to put in here and what is meant by "set_matlab_bgl_options
% for the standard options."
Any help is highly appreciated. I’m currently writing my thesis and desperately need betweenness scores for my network 🙂
Thanks a lot!!! Hello,
I’m trying to calculate the betweenness centrality for all nodes in an adjacency matrix. It is a weighted network. As far as I know, the Input should be the distance matrix which I have obtained from the adjacency matrix.
Then, I found the following code:
http://www.mathworks.com/matlabcentral/fileexchange/10922-matlabbgl/content/matlab_bgl/betweenness_centrality.m
I’m not 100% sure, but I think that this is my solution. However, I’m still new to MatLab and can’t get the code running.
I read some questions about varargin, but I still don’t know what I need to put in here and what is meant by "set_matlab_bgl_options
% for the standard options."
Any help is highly appreciated. I’m currently writing my thesis and desperately need betweenness scores for my network 🙂
Thanks a lot!!! betweenness, graph theory MATLAB Answers — New Questions
How could I convert the account back to external user?
In Microsoft Azure, I was registered the only user of the account.
The I have converted my account form external user to internal user.
How could I convert the account back to external user?
Thank you very much.
In Microsoft Azure, I was registered the only user of the account.The I have converted my account form external user to internal user.How could I convert the account back to external user?Thank you very much. Read More
Formula for Future Dates "IF"
I want to create a formula that will highlight a date based on an entry date and type.
Example.
IF entered AAA on August 23, 2024, after 18M months it is flagged
IF entered BBB on August 23, 2024 after 24 months it is flagged
Is this possible and any recommendations on how to complete the formula? I’ve failed a few times.
I want to create a formula that will highlight a date based on an entry date and type. Example. IF entered AAA on August 23, 2024, after 18M months it is flaggedIF entered BBB on August 23, 2024 after 24 months it is flagged Is this possible and any recommendations on how to complete the formula? I’ve failed a few times. Read More
Solar Panels prices in 2025
By 2025, the price of solar panels is expected to continue dropping due to advancements in technology and increased production efficiency. Analysts predict that the cost per watt could fall to between $0.20 and $0.30, making solar energy more accessible for both residential and commercial use. This reduction in price will further accelerate the global transition to renewable energy sources.
By 2025, the price of solar panels is expected to continue dropping due to advancements in technology and increased production efficiency. Analysts predict that the cost per watt could fall to between $0.20 and $0.30, making solar energy more accessible for both residential and commercial use. This reduction in price will further accelerate the global transition to renewable energy sources. Read More
List toolbar randomly missing
I have a site there the list toolbar randomly doesn’t appear 50% of the time. Refreshing the page usually loads it correctly. There are several lists and libraries on this same site. The issue is happening for all of them.
First image is where it’s suppose to be. Second image is what it’s suppose to be. There is no custom formatting involved here. It’s also happening in three different browsers I’ve tried (Chrome, Edge, Firefox).
I’ve also noticed that some of the other list formatting doesn’t show as well for the choice columns.
Thanks for your help!
I have a site there the list toolbar randomly doesn’t appear 50% of the time. Refreshing the page usually loads it correctly. There are several lists and libraries on this same site. The issue is happening for all of them. First image is where it’s suppose to be. Second image is what it’s suppose to be. There is no custom formatting involved here. It’s also happening in three different browsers I’ve tried (Chrome, Edge, Firefox). I’ve also noticed that some of the other list formatting doesn’t show as well for the choice columns. Thanks for your help! Read More
Switch off Virtual Machines on a schedule using an Azure Tag
1. Introduction
Managing the costs associated with running virtual machines (VMs) in Azure can be challenging, especially when VMs are left running during non-business hours. One effective solution is to schedule automatic shutdowns using Azure tags. In this blog, we’ll walk you through a PowerShell script that uses an Azure tag to define and enforce VM shutdown schedules.
2. Prerequisites
Before you get started, ensure you have the following:
An active Azure subscription.
Appropriate permissions to manage VMs and read tag information.
Basic knowledge of PowerShell scripting.
3. Script Overview
The script manages the power state of Azure virtual machines based on a specified tag and its value, which defines the schedule. For example, a tag named “AutoShutdownSchedule” with a value of “10PM -> 6AM” will shut down the VM at 10 PM and start it at 6 AM.
4. Detailed Script Breakdown
Parameters and Initial Setup
The script accepts three parameters:
TagName: The name of the tag to look for on virtual machines.
ManagementGroupId: The ID of the Azure management group to operate on.
Simulate: If set to $true, the script will only simulate the actions without making any changes.
param (
[parameter(Mandatory = $true)]
[string]$TagName,
[parameter(Mandatory = $true)]
[string]$ManagementGroupId,
[parameter(Mandatory = $false)]
[bool]$Simulate = $false
)
Function: Get-SubscriptionsUnderManagementGroup
This function retrieves all subscription IDs under a specified Azure management group.
function Get-SubscriptionsUnderManagementGroup {
param (
[Parameter(Mandatory = $true)]
[string]$ManagementGroupId
)
# Array to store subscription IDs
$subscriptionIds = @()
# Get the management group hierarchy
$managementGroup = Get-AzManagementGroup -GroupId $ManagementGroupId -Expand
if ($managementGroup -and $managementGroup.Children) {
# Loop through each child in the management group
foreach ($child in $managementGroup.Children) {
if ($child.Type -eq “Microsoft.Management/managementGroups”) {
# Recursively get subscriptions from child management groups
$childManagementGroupId = $child.Name
$subscriptionIds += Get-SubscriptionsUnderManagementGroup -ManagementGroupId $childManagementGroupId
} elseif ($child.Type -match “/subscriptions”) {
# Extract subscription ID
$subscriptionId = [regex]::Match($child.Name, “([a-f0-9-]{36})”).Value
if ($subscriptionId) {
$subscriptionIds += $subscriptionId
}
}
}
}
return $subscriptionIds
}
Function: CheckScheduleEntry
This function checks if the current time falls within a specified time range.
function CheckScheduleEntry ([string]$TimeRange) {
$rangeStart, $rangeEnd, $parsedDay = $null
$currentTime = (Get-Date).ToUniversalTime().AddHours(2)
$midnight = $currentTime.AddDays(1).Date
try {
if ($TimeRange -like “*->*”) {
$timeRangeComponents = $TimeRange -split “->” | ForEach-Object { $_.Trim() }
if ($timeRangeComponents.Count -eq 2) {
$rangeStart = Get-Date $timeRangeComponents[0]
$rangeEnd = Get-Date $timeRangeComponents[1]
if ($rangeStart -gt $rangeEnd) {
if ($currentTime -ge $rangeStart -and $currentTime -lt $midnight) {
$rangeEnd = $rangeEnd.AddDays(1)
}
else {
$rangeStart = $rangeStart.AddDays(-1)
}
}
}
else {
Write-Output “`WARNING: Invalid time range format. Expects valid .Net DateTime-formatted start time and end time separated by ‘->'”
}
}
else {
if ([System.DayOfWeek].GetEnumValues() -contains $TimeRange) {
if ($TimeRange -eq (Get-Date).DayOfWeek) {
$parsedDay = Get-Date “00:00”
}
}
else {
$parsedDay = Get-Date $TimeRange
}
if ($parsedDay -ne $null) {
$rangeStart = $parsedDay
$rangeEnd = $parsedDay.AddHours(23).AddMinutes(59).AddSeconds(59)
}
}
}
catch {
Write-Output “`WARNING: Exception encountered while parsing time range. Details: $($_.Exception.Message). Check the syntax of entry, e.g. ‘<StartTime> -> <EndTime>’, or days/dates like ‘Sunday’ and ‘December 25′”
return $false
}
if ($currentTime -ge $rangeStart -and $currentTime -le $rangeEnd) {
return $true
}
else {
return $false
}
}
Function: AssertVirtualMachinePowerState
This function ensures that a VM is in the desired power state (running or stopped) based on the schedule.
function AssertVirtualMachinePowerState {
param (
[Object]$VirtualMachine,
[string]$DesiredState,
[bool]$Simulate
)
$resourceManagerVM = Get-AzVM -ResourceGroupName $VirtualMachine.ResourceGroupName -Name $VirtualMachine.Name -Status
$currentStatus = $resourceManagerVM.Statuses | Where-Object { $_.Code -like “PowerState*” }
$currentStatus = $currentStatus.Code -replace “PowerState/”, “”
if ($DesiredState -eq “Started” -and $currentStatus -notmatch “running”) {
if ($Simulate) {
Write-Output “[$($VirtualMachine.Name)]: SIMULATION — Would have started VM. (No action taken)”
}
else {
Write-Output “[$($VirtualMachine.Name)]: Starting VM”
$resourceManagerVM | Start-AzVM
}
}
elseif ($DesiredState -eq “StoppedDeallocated” -and $currentStatus -ne “deallocated”) {
if ($Simulate) {
Write-Output “[$($VirtualMachine.Name)]: SIMULATION — Would have stopped VM. (No action taken)”
}
else {
Write-Output “[$($VirtualMachine.Name)]: Stopping VM”
$resourceManagerVM | Stop-AzVM -Force
}
}
else {
Write-Output “[$($VirtualMachine.Name)]: Current power state [$currentStatus] is correct.”
}
}
The script iterates through all VMs in the specified subscriptions, checks their tags, and enforces the power state according to the schedule. Below is the outline of what it does
try {
# Main script logic
}
catch {
$errorMessage = $_.Exception.Message
throw “Unexpected exception: $errorMessage”
}
finally {
Write-Output “Script finished (Duration: $((“{0:hh:mm:ss}” -f ((Get-Date).ToUniversalTime() – $currentTime))))”
}
5. Usage Example
To run the script, use the following command:
.StartStopVMsBasedOnTag.ps1 -TagName “AutoShutdownSchedule” -ManagementGroupId “MngEnv” -Simulate $true
I will be running the example in Local PowerShell, but the PowerShell could be run from anywhere including Automation Accounts.
5.1 We tag our virtual machine accordingly
5.2 We look at our PowerShell code after being signed in to Azure and we run our command
5.3 We used the “-Simulate $true” flag which shows us what would have happened. If we want to run this in production, we can simulate first and when we are happy with our testing we can stop simulating by switching the “-Simulate $false”
6. Conclusion
Automating VM shutdown schedules using Azure tags helps optimize resource usage and reduce costs. By following this guide, you can implement a similar solution in your Azure environment. If you have any questions or feedback, feel free to leave a comment below. You can find a copy of this code in my GitHub Repo –> RallTheory/StartStopVMs/StartStopVMsBasedOnTag.ps1 at main · WernerRall147/RallTheory (github.com)
Disclaimer
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts or Power BI Dashboards are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts or Power BI Dashboards be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. This blog post was written with the help of generative AI.
Microsoft Tech Community – Latest Blogs –Read More
How to create a degradation feature profile from available sensor data?
I have gathered sensor data. Now I want to derive degradation feature profile for my data to perform RUL estimation using exponential degradation model. The main reason behind using this model is that I have threshold values, but no run-to-failure data.I have gathered sensor data. Now I want to derive degradation feature profile for my data to perform RUL estimation using exponential degradation model. The main reason behind using this model is that I have threshold values, but no run-to-failure data. I have gathered sensor data. Now I want to derive degradation feature profile for my data to perform RUL estimation using exponential degradation model. The main reason behind using this model is that I have threshold values, but no run-to-failure data. predictive maintenance, rul, degradation models, condition monitoring MATLAB Answers — New Questions
UNDISTORT STEREO Images before RECTIFICATION ?
This is a query reg. Stereo Rectification using Matlab inbuilt functions
Does one need to :
UNDISTORT the STEREO Images before RECTIFICATION ?
My pair of views are near-perfect, but has large disparity.
Using stereo-Calibration, I get the distortion parameters as (given below for only one of the cameras):
RadialDistortion:
[-0.163 0.0958]
TangentialDistortion:
~ [ 0, 0];
Skew: -0.600.
The 3D back-projected results appear OK, but I am looking for high accuracy. Hence the query.
Any useful advise will be beneficial (thanx in advance, for that)This is a query reg. Stereo Rectification using Matlab inbuilt functions
Does one need to :
UNDISTORT the STEREO Images before RECTIFICATION ?
My pair of views are near-perfect, but has large disparity.
Using stereo-Calibration, I get the distortion parameters as (given below for only one of the cameras):
RadialDistortion:
[-0.163 0.0958]
TangentialDistortion:
~ [ 0, 0];
Skew: -0.600.
The 3D back-projected results appear OK, but I am looking for high accuracy. Hence the query.
Any useful advise will be beneficial (thanx in advance, for that) This is a query reg. Stereo Rectification using Matlab inbuilt functions
Does one need to :
UNDISTORT the STEREO Images before RECTIFICATION ?
My pair of views are near-perfect, but has large disparity.
Using stereo-Calibration, I get the distortion parameters as (given below for only one of the cameras):
RadialDistortion:
[-0.163 0.0958]
TangentialDistortion:
~ [ 0, 0];
Skew: -0.600.
The 3D back-projected results appear OK, but I am looking for high accuracy. Hence the query.
Any useful advise will be beneficial (thanx in advance, for that) transferred, stereo MATLAB Answers — New Questions
how to extract the learned features from a dlnetwork
I wanted to extract the feature vector of training and testing data from a dlnetwork by using the activations and forward functions, matlab show me this error with any format of training and testing data, Incorrect number or types of inputs or outputs for function activations or forward function.
featureSet = forward(net,trainData,net.Layers(181).Name,’OutputAs’,’columns’);
featureSet = activations(net,dltrainData,net.Layers(181).Name);
is there another running instruction with another format of training and testing dataI wanted to extract the feature vector of training and testing data from a dlnetwork by using the activations and forward functions, matlab show me this error with any format of training and testing data, Incorrect number or types of inputs or outputs for function activations or forward function.
featureSet = forward(net,trainData,net.Layers(181).Name,’OutputAs’,’columns’);
featureSet = activations(net,dltrainData,net.Layers(181).Name);
is there another running instruction with another format of training and testing data I wanted to extract the feature vector of training and testing data from a dlnetwork by using the activations and forward functions, matlab show me this error with any format of training and testing data, Incorrect number or types of inputs or outputs for function activations or forward function.
featureSet = forward(net,trainData,net.Layers(181).Name,’OutputAs’,’columns’);
featureSet = activations(net,dltrainData,net.Layers(181).Name);
is there another running instruction with another format of training and testing data extracting features from a pretrained dlnetwork MATLAB Answers — New Questions
Using Palestinian Authority with Maps
Hello,
For some reason I am unable to get Palestine to display in a map chart. I have tried turning it into a geography datatype as well as attempting multiple names (State of Palestine, Palestinian Authority, Occupied Palestinian Territory, etc), but it will not display on the map (its region instead says “plot data” when hovered over on a map). I have gotten “Gaza” to work, but this only displays the region of Gaza and “West Bank” has no success. Is there a way to display either both Palestinian Territories together or a way to display the West Bank (as I have already managed to display the Gaza Strip using “Gaza”)?
Also, I am using Excel 365 for Mac—there seem to be some differences in application type.
Thanks!
Hello, For some reason I am unable to get Palestine to display in a map chart. I have tried turning it into a geography datatype as well as attempting multiple names (State of Palestine, Palestinian Authority, Occupied Palestinian Territory, etc), but it will not display on the map (its region instead says “plot data” when hovered over on a map). I have gotten “Gaza” to work, but this only displays the region of Gaza and “West Bank” has no success. Is there a way to display either both Palestinian Territories together or a way to display the West Bank (as I have already managed to display the Gaza Strip using “Gaza”)? Also, I am using Excel 365 for Mac—there seem to be some differences in application type.Thanks! Read More
Changing border colors for Map Chart made from categories
Hello,
I currently have an excel sheet that contains countries and their associated categories. Example:
Countries:CategoriesUnited StatesCategory 1RussiaCategory 2ChinaCategory 3
When I insert a Map from this data, the countries that I list get colored according to the category and receive a transparent border (hard to tell since the background is white but when copied into PowerPoint the borders appear transparent). When I change the border color for the series under ‘Format’ and ‘Series’ and ‘Border’, ‘Solid Line’, it changes the border color for all countries for which no data is provided, but leaves the transparent borders untouched. How can I change the border color of all my countries which have category data? I am able to manually change each border color individually, but I want a way to change all the borders at once and without using vba.
Also, I am using Excel 365 for Mac—there seem to be some differences in application type.
Thanks!
Hello,I currently have an excel sheet that contains countries and their associated categories. Example:Countries:CategoriesUnited StatesCategory 1RussiaCategory 2ChinaCategory 3When I insert a Map from this data, the countries that I list get colored according to the category and receive a transparent border (hard to tell since the background is white but when copied into PowerPoint the borders appear transparent). When I change the border color for the series under ‘Format’ and ‘Series’ and ‘Border’, ‘Solid Line’, it changes the border color for all countries for which no data is provided, but leaves the transparent borders untouched. How can I change the border color of all my countries which have category data? I am able to manually change each border color individually, but I want a way to change all the borders at once and without using vba.Also, I am using Excel 365 for Mac—there seem to be some differences in application type.Thanks! Read More
hellooooooooooooo
Hello, I’m having a problem that I can’t solve, yesterday my stock input and output system that I made worked well but the input and output columns collapsed and I don’t understand why, I always advance and save, it’s like having a check point, maybe when I go back to a previous save point I get the same error.
Hello, I’m having a problem that I can’t solve, yesterday my stock input and output system that I made worked well but the input and output columns collapsed and I don’t understand why, I always advance and save, it’s like having a check point, maybe when I go back to a previous save point I get the same error. Read More
locking and sorting rows
Is there a way to lock the data of two rows to be able to sort the rows locked together? I am needing to be able to sort by the totals showing at the end of the 1st of the two rows.
example below:
20.5212020.5082.00890.00169.992020.51719.1776.673.3279.99 21.2521.7521.521.5086.002.5688.56178.5620.5202120.5082.00890.00 17.25121715.4261.67869.67162.3321.2521.252121.1784.67892.67 21.521.7521.521.5886.337.4493.77185.77320.521.52121.0084.00892.00
Is there a way to lock the data of two rows to be able to sort the rows locked together? I am needing to be able to sort by the totals showing at the end of the 1st of the two rows.example below:20.5212020.5082.00890.00169.992020.51719.1776.673.3279.99 21.2521.7521.521.5086.002.5688.56178.5620.5202120.5082.00890.00 17.25121715.4261.67869.67162.3321.2521.252121.1784.67892.67 21.521.7521.521.5886.337.4493.77185.77320.521.52121.0084.00892.00 Read More
Learn how to use PivotTables using Copilot in Excel
Greetings, we continue our series of posts this week that show how you can get help from copilot with the chat helper. Today we will show how you can use it to learn how to use PivotTables. We’ll show this by asking Copilot in Excel the following question:
Can you tell me the basics for creating a PivotTable?
Based on the question, Copilot in Excel returns a step-by-step guide for how to create a PivotTable in Excel:
“Certainly! Here’s a step-by-step guide to creating a PivotTable in Excel:
Select Your Data: Click on any cell within the range of data you want to use for your PivotTable. Make sure your data has column headings and no blank rows or columns.
Insert PivotTable: Go to the Ribbon, click on the “Insert” tab, and then click on “PivotTable”. Excel will automatically select the data for the PivotTable or you can select the range manually.
Choose Where to Place the PivotTable: In the dialog box that appears, you can choose to place the PivotTable in a new worksheet or in an existing worksheet. Select your preference and click “OK”.
Arrange Fields: Drag and drop the fields from your data (listed in the PivotTable Field List) into one of the four areas:
Filters: To apply filters that affect the entire PivotTable.
Columns: To show data horizontally across the top of the PivotTable.
Rows: To display data vertically on the side of the PivotTable.
Values: To aggregate data (sum, count, average, etc.) in the body of the PivotTable.
Customize Your PivotTable: You can further customize your PivotTable by sorting, filtering, and formatting the data. You can also change the summary function and refresh the data if the source data changes.
Refresh PivotTable: If the source data changes, you can update the PivotTable by right-clicking anywhere in the PivotTable and selecting “Refresh”.
Remember to check that your data is well-organized, with no empty rows or columns, and that each column has a unique header. This will ensure that your PivotTable works correctly.”
The response is a good overview. If you want to go a bit deeper and get more detail, you could use the following prompt:
Can you give me a more detailed example?
Copilot in Excel returns more information, using a sales data set as an example and shows how a PivotTable may layout the data:
“Certainly! Let’s say you have a sales dataset with the following columns: Date, Product, Region, Salesperson, and Sales. Here’s how you would create a PivotTable to analyze total sales by product and region:
Select Your Data: Click on any cell within your dataset. Ensure that each column has a unique header and there are no blank rows or columns in your range.
Insert PivotTable: Go to the “Insert” tab on the Ribbon and click on “PivotTable”. Excel will select the data for the PivotTable or you can adjust the range if needed.
Choose PivotTable Location: In the Create PivotTable dialog box, choose to place the PivotTable in a new worksheet or an existing worksheet. Click “OK”.
Arrange Fields: In the PivotTable Field List, drag and drop the Product field to the Rows area, the Region field to the Columns area, and the Sales field to the Values area. This will create a matrix with products listed down the rows, regions across the columns, and the sum of sales in the body of the PivotTable.
Customize Your PivotTable: You can sort the products or regions, apply filters, or change the summary function from sum to count, average, etc., by using the dropdown menus in the PivotTable.
Refresh PivotTable: If your source data changes, right-click anywhere in the PivotTable and select “Refresh” to update the data.
Here’s an example of what the PivotTable could look like:
| Region 1 | Region 2 | Region 3 | Grand Total
—————————————————–
Product A | $5,000 | $7,000 | $4,000 | $16,000
Product B | $3,000 | $8,000 | $2,000 | $13,000
Product C | $6,000 | $2,000 | $3,000 | $11,000
—————————————————–
Grand Total | $14,000 | $17,000 | $9,000 | $40,000
This PivotTable shows the total sales for each product in each region, as well as the grand totals for each product and each region.”
Over the coming weeks I will be sharing more examples of what you can do with Copilot in Excel.
Thanks for reading,
Microsoft Excel Team
*Disclaimer: If you try these types of prompts and they do not work as expected, it is most likely due to our gradual feature rollout process. Please try again in a few weeks.
Greetings, we continue our series of posts this week that show how you can get help from copilot with the chat helper. Today we will show how you can use it to learn how to use PivotTables. We’ll show this by asking Copilot in Excel the following question:
Can you tell me the basics for creating a PivotTable?
Based on the question, Copilot in Excel returns a step-by-step guide for how to create a PivotTable in Excel:
Picture of Copilot in Excel pane showing the above prompt with a step-by-step guide for creating a PivotTable.
“Certainly! Here’s a step-by-step guide to creating a PivotTable in Excel:
Select Your Data: Click on any cell within the range of data you want to use for your PivotTable. Make sure your data has column headings and no blank rows or columns.
Insert PivotTable: Go to the Ribbon, click on the “Insert” tab, and then click on “PivotTable”. Excel will automatically select the data for the PivotTable or you can select the range manually.
Choose Where to Place the PivotTable: In the dialog box that appears, you can choose to place the PivotTable in a new worksheet or in an existing worksheet. Select your preference and click “OK”.
Arrange Fields: Drag and drop the fields from your data (listed in the PivotTable Field List) into one of the four areas:
Filters: To apply filters that affect the entire PivotTable.
Columns: To show data horizontally across the top of the PivotTable.
Rows: To display data vertically on the side of the PivotTable.
Values: To aggregate data (sum, count, average, etc.) in the body of the PivotTable.
Customize Your PivotTable: You can further customize your PivotTable by sorting, filtering, and formatting the data. You can also change the summary function and refresh the data if the source data changes.
Refresh PivotTable: If the source data changes, you can update the PivotTable by right-clicking anywhere in the PivotTable and selecting “Refresh”.
Remember to check that your data is well-organized, with no empty rows or columns, and that each column has a unique header. This will ensure that your PivotTable works correctly.”
The response is a good overview. If you want to go a bit deeper and get more detail, you could use the following prompt:
Can you give me a more detailed example?
Copilot in Excel returns more information, using a sales data set as an example and shows how a PivotTable may layout the data:
Picture of Copilot in Excel pane showing the above prompt with a detailed example for creating a PivotTable.
“Certainly! Let’s say you have a sales dataset with the following columns: Date, Product, Region, Salesperson, and Sales. Here’s how you would create a PivotTable to analyze total sales by product and region:
Select Your Data: Click on any cell within your dataset. Ensure that each column has a unique header and there are no blank rows or columns in your range.
Insert PivotTable: Go to the “Insert” tab on the Ribbon and click on “PivotTable”. Excel will select the data for the PivotTable or you can adjust the range if needed.
Choose PivotTable Location: In the Create PivotTable dialog box, choose to place the PivotTable in a new worksheet or an existing worksheet. Click “OK”.
Arrange Fields: In the PivotTable Field List, drag and drop the Product field to the Rows area, the Region field to the Columns area, and the Sales field to the Values area. This will create a matrix with products listed down the rows, regions across the columns, and the sum of sales in the body of the PivotTable.
Customize Your PivotTable: You can sort the products or regions, apply filters, or change the summary function from sum to count, average, etc., by using the dropdown menus in the PivotTable.
Refresh PivotTable: If your source data changes, right-click anywhere in the PivotTable and select “Refresh” to update the data.
Here’s an example of what the PivotTable could look like:
| Region 1 | Region 2 | Region 3 | Grand Total
—————————————————–
Product A | $5,000 | $7,000 | $4,000 | $16,000
Product B | $3,000 | $8,000 | $2,000 | $13,000
Product C | $6,000 | $2,000 | $3,000 | $11,000
—————————————————–
Grand Total | $14,000 | $17,000 | $9,000 | $40,000
This PivotTable shows the total sales for each product in each region, as well as the grand totals for each product and each region.”
Over the coming weeks I will be sharing more examples of what you can do with Copilot in Excel.
Thanks for reading,
Microsoft Excel Team
*Disclaimer: If you try these types of prompts and they do not work as expected, it is most likely due to our gradual feature rollout process. Please try again in a few weeks. Read More
Announcement: System.Data.SqlClient package is now deprecated
We announced Microsoft.Data.SqlClient in the first half of 2019 and shipped the first stable package later that year. That release coincided with .NET Core 3.0. We’ve been developing Microsoft.Data.SqlClient in the dotnet/SqlClient repo since that time, over the last five years. It’s now time to start the deprecation process for the System.Data.SqlClient package. We plan to take a staged process to deprecation, with the intent to align support changes and associated code transition activities between these libraries to natural migration points between .NET major versions.
All System.Data.SqlClient users are encouraged to transition to Microsoft.Data.SqlClient. We offer improvements and significantly higher support via the Microsoft.Data.SqlClient package.
Plan
We intend to deprecate the System.Data.SqlClient package in stages.
Before .NET 9 GA:
Publish a new 5.0.0 package, including the following changes.
Remove support for .NET 7 and earlier and .NET Framework 4.6.1 and earlier.
Publish assets for the following target frameworks: .NET 8, .NET Framework 4.6.2, .NET Standard 2.0.
Add Obsolete attributes to .NET 8 and .NET Standard 2.0 assets. This will generate new warnings for .NET 8+ and .NET Standard users.
Continue to offer security servicing, for .NET 8, and .NET Framework 4.6.2+ application users.
After .NET 9 GA:
No change
We will not support this package for .NET 9+ application users.
After .NET 8 EOL:
Remove support for .NET 8 users (the .NET 8 library will be removed).
Maintain support for .NET Framework 4.6.2+ users.
Security servicing will be provided via .NET Framework, not the package, at that point.
We do not expect to update the package again after this point.
We will not mark the package as deprecated since it will only support .NET Framework users with an implementation provided by .NET Framework.
We will remove support in the package for unsupported .NET and .NET Framework versions at various stages of this deprecation plan. Users affected by those changes are encouraged to move to a supported .NET or .NET Framework version and to adopt the Microsoft.Data.SqlClient package.
We decided to remove support for .NET 6 since it will go EOL shortly after this new package is released, even though .NET 6 will still be supported at the time. Publishing a .NET 8 library significantly simplifies the plan, both in terms of what we will deliver and what we need to explain.
For .NET dates, see .NET Releases. .NET 9 will GA in November of this year. .NET 8 will go EOL in November, 2026.
The current package version of System.Data.SqlClient is 4.8.6, at the time of writing. These changes will be made with a 5.0.0 version and later.
Note: This deprecation doesn’t apply to the System.Data.SqlClient namespace in .NET Framework.
Microsoft.Data.SqlClient
Daily downloads of Microsoft.Data.SqlClient on nuget.org are nearing 50% higher than System.Data.SqlClient. We expect the gap in usage between the two libraries will continue to increase. Microsoft.Data.SqlClient is the best library we offer to access SQL Server.
We are committed to providing high-quality, performance-driven, and secure data access technologies. We strongly encourage users to transition to Microsoft.Data.SqlClient. It is actively maintained and supports the latest SQL Server features.
How to migrate?
Add the NuGet package to your project, then update your references and using statements. Our porting cheat sheet provides a step-by-step set of changes you may need to make.
Update your project references: Replace references to System.Data.SqlClient with Microsoft.Data.SqlClient.
Modify your using statements: Update your using statements in your code files from System.Data.SqlClient to Microsoft.Data.SqlClient.
Test your application: Thoroughly test your application to ensure that it works as expected after the migration.
We also plan to support semi-automatic migration via .NET Upgrade Assistant.
Support & Feedback: If you have any questions or need assistance with the migration, please reach out through our official support channels or join the discussion on our GitHub repository.
Resources
Frequently Asked Questions – dotnet/SqlClient Wiki – GitHub
Introduction to Microsoft.Data.SqlClient namespace
SQL Server and ADO.NET (Microsoft.Data.SqlClient)
Microsoft.Data.SqlClient API Browser
Microsoft Tech Community – Latest Blogs –Read More
MVP’s Favorite Content: M365 MVP Week #2
In this blog series dedicated to Microsoft’s technical articles, we’ll highlight our MVPs’ favorite article along with their personal insights.
Kevin McDonnell, M365 MVP, United Kingdom
Copilot Learning Hub | Microsoft Learn
“One of the challenges of Copilot is to realise that there is more than just one. Dona Sarkar has pulled together a huge range of guests to help explain so many of the different areas in the Copilot Learning Hub, with experts across Microsoft and the community for all things Copilot”
Kevin TRELOHAN, M365 MVP, France
Copilot for Microsoft 365 – Service Descriptions | Microsoft Learn
“If you want to learn how copilot for Microsoft 365 works it’s real good page to Pin in your bookmark because you’ve here all links and information to have an overview in each App like Word, Excel, etc…”
*Relevant Event: August 29 – [GAIC-fr] Copilot M365 pour les débutants | LinkedIn
Masayuki Mokudai (もくだいさん), M365 MVP, Japan
“Microsoft Learn offers a wealth of content on Power Automate, but some features are not available to Power Automate Basic users with only a Microsoft 365 license. Therefore, we have created training content that compiles only the necessary information for Microsoft 365 users.”
(In Japanese: Microsoft LearnにはPower Automate に関する豊富なコンテンツがありますが、Microsoft 365ライセンスのみを持つPower Automate Basicユーザーには利用できない機能も含まれています。そこで、Microsoft 365ユーザー向けに必要な情報だけをまとめたトレーニングコンテンツを作成しました。)
*Relevant Blog: Microsoft Learn: ラーニングモジュールで学ぶ365ユーザー向けキャンバスアプリ&フロー開発 – もくだいさんのOffice365至高のレシピ (mokudai.jp)
Laurent Carlier, M365 MVP, France
Summary of governance, lifecycle, and compliance capabilities for Loop experiences | Microsoft Learn
“Microsoft Loop is undoubtedly one of the tools I’m pushing for internally, but also with my customers, to streamline collaboration and be more active in the project phases. Since its arrival in the Microsoft 365 ecosystem, Loop has come a long way in terms of security, compliance, features, etc. These topics regularly come up in discussions with my customers, which is why I regularly refer to this documentation to understand everything before deploying the Loop application.”
*Relevant Blog: INFOGRAPHICS & ARTICLES | Teams2simple
Microsoft Tech Community – Latest Blogs –Read More
Why do I receive “(MLM) Not master server, checkout attempt of ‘MATLAB’ from user@host refused” in the license manager log file?
Clients are reporting they receive License Manager Error -18 when they try to start MATLAB, and I am seeing errors in the log file. Why do I receive "(MLM) Not master server, checkout attempt of ‘MATLAB’ from user@host refused" in the license manager log file?Clients are reporting they receive License Manager Error -18 when they try to start MATLAB, and I am seeing errors in the log file. Why do I receive "(MLM) Not master server, checkout attempt of ‘MATLAB’ from user@host refused" in the license manager log file? Clients are reporting they receive License Manager Error -18 when they try to start MATLAB, and I am seeing errors in the log file. Why do I receive "(MLM) Not master server, checkout attempt of ‘MATLAB’ from user@host refused" in the license manager log file? MATLAB Answers — New Questions
How to plot the input which is R for LQR?
I am getting 2 outputs my system is inverted pendulum with 4 states.
How can I get the input plot the value of R as well?
further I am gettign only two states the cart position and teh angle of the penduum. How I can plot the other two states velocity and angular velocity in teh same plot where I am getting the position and the pendulum angle?I am getting 2 outputs my system is inverted pendulum with 4 states.
How can I get the input plot the value of R as well?
further I am gettign only two states the cart position and teh angle of the penduum. How I can plot the other two states velocity and angular velocity in teh same plot where I am getting the position and the pendulum angle? I am getting 2 outputs my system is inverted pendulum with 4 states.
How can I get the input plot the value of R as well?
further I am gettign only two states the cart position and teh angle of the penduum. How I can plot the other two states velocity and angular velocity in teh same plot where I am getting the position and the pendulum angle? lqr, inverted pendulum, plotting, subplot MATLAB Answers — New Questions
MS Project Export as CSV not generating non english language data
i have been following below link to save MS Project file as CSV
https://support.microsoft.com/en-us/office/export-or-import-data-to-another-file-format-6e6e581f-a580-4f04-aa87-9b6552143d9c#:~:text=Choose%20File%20%3E%20Save%20As.%20Choose%20Browse.%20In,a%20name%20for%20the%20exported%20file.%20Choose%20Save
using Existing Task Export Map to save as CSV
Issue i am facing is after generating CSV, non English data is getting corrupted, showing as “????????” in the CSV
CSV File generated is getting saved as ANSI encoding, there is no way to change it to UTF 8 in Export Wizard
these are all steps can be done Mannully on MS Project
i also have MSPPlugin written in DotNet which does same exact steps programmatically
have used below APIs to perform the same
https://learn.microsoft.com/en-us/office/vba/api/project.application.mapedit
https://learn.microsoft.com/en-us/office/vba/api/project.application.filesaveas
getting same output as shown in screenshot
Note: I have MS Project Standard 2019 installed on windows
i have been following below link to save MS Project file as CSVhttps://support.microsoft.com/en-us/office/export-or-import-data-to-another-file-format-6e6e581f-a580-4f04-aa87-9b6552143d9c#:~:text=Choose%20File%20%3E%20Save%20As.%20Choose%20Browse.%20In,a%20name%20for%20the%20exported%20file.%20Choose%20Saveusing Existing Task Export Map to save as CSV Issue i am facing is after generating CSV, non English data is getting corrupted, showing as “????????” in the CSV CSV File generated is getting saved as ANSI encoding, there is no way to change it to UTF 8 in Export Wizardthese are all steps can be done Mannully on MS Projecti also have MSPPlugin written in DotNet which does same exact steps programmaticallyhave used below APIs to perform the samehttps://learn.microsoft.com/en-us/office/vba/api/project.application.mapedithttps://learn.microsoft.com/en-us/office/vba/api/project.application.filesaveas getting same output as shown in screenshotNote: I have MS Project Standard 2019 installed on windows Read More