2009-12-20

Error when querying linked server from 64-bit SQL2005/SQL2008 to 32-bit SQL 2000

When you got following message when accessing 32-Bit sql2000 linked server
The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "". The provider supports the interface, but returns a failure code when it is used.

Try the method as mentioned in here:

1. Make sure the sql server is upgraded to sp3/sp4

2. Launch the following command from DOS:
osql -E -S \ -i \instcat.sql

Where location is the instance installation path
(Default:C:\Program Files\Microsoft SQL Server\MSSQL\Install)

...It will takes one or few minutes for the sql to finish...

3. When the command is finished, you can run the linked server query again without restarting the servers.

2009-12-18

Excel 2010 Object Model Changes

Seems the VBA changes on Excel 2010 has been fixed.
A official comparsion to 2007/2003 could be found here


Luckly, there are no critical changes like FileFind in 2007.
Most of them are related to conditional formatings.

2009-12-06

Excel:1-minute Tricks Series Vol.1:Format Painter Special feature

Without re-do formatting or re-entry data every time,
"Format Painter" providing a convenient ways on copying formats from one position to others.

Just like copy and paste, select the cells to copy first.
And then, click on the format painter


Notice that the cursor will become brush style


Select the target location/range, done!


I think many of you already know the above...
So what about the "special feature"?

You can also paste the format to multiple locations but without copying multiple times.

Double click the format painter when copy.
Even something has been pasted, the button will not be restored.

To stop the format painter, press "Esc" on keyboard.

This feature also applied to Excel 97 and later on version.

That's all of the first trick!

2009-11-29

Office 2010 Beta Activation issue

When there is a problem on activiting the office beta:
"The setup controller has encountered a problem during install. Please review the log files for further information on the error."


Try the steps below:
1. Launch the setup program "setup.exe" under this location
C:\Program Files\Common Files\microsoft shared\OFFICE14\Office Setup Controller

2. Select "Enter a product key"


3. Click on continue

4. Wait the excel for re-deploy.... and click OK

5. Launch Excel again (or any Office program you like). This option is now back.


6. Wait again for the activiton. Click close when reaching this screen.


7. Restart the Excel. Finish!

2009-11-17

Excel VBA Stub: Rearranging Sheets

Codes for re-ordering worksheet
subSplitAndHideSheets: split and hide sheets that not appeared on list: strSheetsAll

------------------


Sub subLaunch
dim strSheetsAll as string
strSheetsAll = "Sheet1;Sheet3;Sheet2"
call subSplitAndHideSheets(strSheetsAll)
end sub


Sub subSplitAndHideSheets(wbCurr As Workbook, strSheetsAll as string)

Dim strSheets() As String
Dim strSheetsSD
Dim intSheetsCounter As Integer
Dim intSheetsCount As Integer
Dim intCurrSheet As Integer


If strSheetsAll = "" Then
Exit Sub 'Exit sub if not given
End If

Set strSheetSD = CreateObject("Scripting.Dictionary")

strSheets = Split(strSheetsAll, ";")
intCurrSheet = 1
intSheetsCount = UBound(strSheets)
For intSheetsCounter = 0 To UBound(strSheets)
If funcChkSheetExist(wbCurr, strSheets(intSheetsCounter)) Then
strSheetSD.Add (UCase(strSheets(intSheetsCounter))), Nothing
wbCurr.Sheets(strSheets(intSheetsCounter)).Move before:=Sheets(intCurrSheet)
intCurrSheet = intCurrSheet + 1
End If
Next

intSheetsCount = wbCurr.Worksheets.Count
If intSheetsCount <= 1 Then
Exit Sub
End If
For intSheetsCounter = 1 To wbCurr.Worksheets.Count
If wbCurr.Sheets(intSheetsCounter).Visible = xlSheetVisible Then
'set as hidden: if Sheet not exist in given string array and name is not parameters
If Not strSheetSD.exists(UCase(wbCurr.Sheets(intSheetsCounter).Name)) And _
UCase(wbCurr.Sheets(intSheetsCounter).Name) <> STRSHEETNAME_PARAMETERS Then
wbCurr.Sheets(intSheetsCounter).Visible = xlSheetHidden
End If
End If
Next
End Sub

Function funcChkSheetExist(wbCurr As Workbook, strSheet As String)
On Error GoTo errHandling
Dim tmpVal
tmpVal = wbCurr.Sheets(strSheet).Range("A1")
funcChkSheetExist = True
Exit Function
errHandling:
funcChkSheetExist = False
End Function

2009-11-13

Excel: 此"列"不同彼"列"



神把人的語言分拆了,但人們只懂使其更複雜...
下面的是真人真事.

與香港客戶對話:

我:就是這個"列"有問題吧?
客:什麼列? 這兩"行"有問題...
我:ok,我幫你檢查一下這"行".


與大陸同事對話:

我:可以幫忙刪去這個值(欄)嗎?
同事:刪去這"列"對吧?
我:不是這"列",是這"欄".
同事:刪去這"列"就行了嗎?
我:不是這"列",是這"欄"!!!!
同事:...就是這"列"吧,不知你"欄"是什麼意.
...



...投降啦.我以後還是用英語啦

相信這個是比較特別的例子
其他的會是功能上,但做成亂的機會比較少:
樞紐表vs透視表,宏 vs 宏集 vs 巨集.

(2010-01-26 後記: 日本語版本跟簡體版一樣,也是"行"+"列")

2009-09-10

MCAS CM in Japan

睇下人地幾dum本.細田都以經算係1線演員.
香港果間代理,學下野啦.





2009-09-05

SQL Azure CTP SSMS connection

To connect to Azure with SSMS:
1. Launch the SSMS 2008
2. When you are prompted for connection, click CANCEL
Otherwise you would go the following message

----
Cannot connect to SERVERNAME.ctp.database.windows.net
----
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
-->Invalid object name ’sys.configurations’. (Microsoft SQL Server, Error: 208)




3. Click on NEW QUERY
https://sql.azure.com/


4. Login to the database with detail provided during activation at



a. Server name: SERVERNAME.ctp.database.windows.net
b. Authentication: SQL Server Authentication
c. login: LOGIN@SERVERNAME
d. password
e. DB: if you created a DB, select it under option ->connection properties first.
Since the USE DB_NAME doesn't works...

5. you may just ignore this warning



6. Finish!

2009-08-14

Excel 2010 SSAS Cube Sets.

Following up with SSAS features in Excel 2010
Besides creating sets contain only dimension members or calculated members,
you can them both in the same set:



The magic of the sets could be respected to the new "calculatedmember" property in the connection object:

ActiveWorkbook.connections("...").OLEDBConnection.CalculatedMembers.Add Name:="[Set1]", Formula:= "{....}"

2009-08-13

What's New in Excel 2010 (Web Resources)

0.General
Official free ebook on Office 2010 features:
First look in Microsoft Office 2010

1. SSAS Cube Related:

Frederik Vandeputte's Blog
Measures:
Running Total (Year To End),
Displaying Single Measure Multiple times
Dimensions
Interactive Filter (Instance selection on typing)
Dynamic Sets (A user friendly approach :-) )
Create Set base Rows Items
Write Backs

Chris Webb Blog
Dynamic Sets
Sets Creation with UI

2. How to show everything with sparklines

Excel Team
- Sparklines as LINE
- Formats: Low / High
- "sparklines are in an Excel table you can add another row of data and the sparkline group would grow and add another sparkline to the table"

Excel Team
- Sparklines as column
- Formats: Negative Points and Styles

Excel Team (1)
Excel Team (2)
-Sparklines as winloss
- Sparkines axis and Reference Line

Excel Team
- Line Up Points

3. Conditional Formatting
Excel Team
- Icon set now customizable
- "Exception handling" in icon set, e.g. negative value

Excel Team
- Proportional Value Bar
- Negative value Bar
- Formating Border/Fills

4. Charting
Excel Team
- Interactivity: Fields button (selection of range and "drilldown" easily)
- Double click objects to format (am... is it so important?)
- Data points: limit of data points extended.

5. Security
Excel Team
Should be something related to this one...


Excel Team
-Protected view for VBA, in control of file access.

General
Overview from Microsoft

Some screenshots in pre-"technical preview"

2009-08-04

Excel 2010 Technical Preview invitation released

Received the invitation finally...


It's include the following applications:
Microsoft Office Professional 2010 (word,Excel,PowerPoint,OneNote,Outlook,Publisher,Access)
Microsoft Visio 2010
Microsoft SharePoint Designer 2010
MicrosoftR InfoPath 2010
MicrosoftR SharePoint Workspace 2010
Business Contact Manager for Microsoft Outlook 2010

Nice that it comes with Japanese language pack
By the way, the product key could not be used with Windows Server...
I need to find another machine for it...

2009-08-02

Excel:SSAS:Locale Reference 語言設定參考

SSAS/EXCEL語言設定參考孖寶 SSAS/EXCEL Translation reference

1.setting up connection
http://www.extremeexperts.com/sql/Tips/ExcelDiffLocale.aspx
2.Locale code
http://www.krafft.com/scripts/deluxe-calendar/lcid_chart.htm

中文有關設定 Chinese related settings:
繁中: 1028 (TAIWAN)
簡中: 2052 (PRC)
香港地區(3076),澳門地區(5724),最後如果沒在SSAS指定,會resolve成1028(即繁中)
詳看msdn

Where to set excel "default" locale for SSAS connection

Control panel->
regional and language option->
"standards and format" section (UPPER section):
select the region
("location" section setting is NOT related)

SSAS Translation: Enterprise vs Standard
標準版只支援維度內容.
standard version support only translation of content in dimension.

metadata translation的意思是維度名稱,cube部件的名字等等...

2009-07-05

Excel: Copying formula

In some situation that you may need to edit the formula in batch,
Besides using the replace function, you can use the "formula view"

By pressing "CTRL+`" (Button for ~),
or (Excel before 2007) Tools->Option->View->Windows Option->[Formula]
(Excel 2007) Formula Ribbon-> Formula Auditing->Display formula

You can view and even copy the formula to other application e.g. Notepad/Ultra Editor

Excel & Excel Exam Study Index (Version 0.1) with Excel 2010

Following up on Post about MCAS Excel MOC:

I'm going to a some more description or links on each topics.
This post will be the index of it.
However, this will be a long long long project...


Section 7. Using Basic Formulas and Functions.
Building Basic Formulas.
Displaying Formulas on the Screen.
->Post in this blog
Printing Formulas.

2009-06-28

MCAS: 77-602 Excel Exam Content List (From Microsoft Official Courseware)

Following up on Post about MCAS Excel MOC:

I'm going to a some more description or links on each topics.
This post will be the index of it.
However, this will be a long long long project...

Section 1. Excel Essentials
Starting Excel.
Working in the Excel Window.
Using the On-Screen Tools.
Using the Office Button.
Changing Excel’s View.
Splitting a Window.
Opening a New Window.
Working with an Existing Workbook.
Opening an Existing Workbook.
Navigating a Worksheet.
Entering Data in a Worksheet.
Selecting, Editing, and Deleting a Cell’s
Quick-Printing a Worksheet.
Saving an Edited Workbook.
Closing a Workbook.

Section 2. Creating and Editing a Workbook.
Creating a Workbook.
Starting a Sales Report from Scratch.
Populating a Worksheet with Data.
Entering Labels.
Entering Dates.
Entering Values.
Filling a Series with AutoFill.
Cutting, Copying, and Pasting Data.
Copying a Data Series with the Mouse.
Moving a Data Series with the Mouse.
Copying and Pasting Data.
Cutting and Pasting Data.
Editing a Workbook’s Properties.
Setting Basic Properties.
Assigning Keywords to a Document.
Printing a Worksheet.
Setting the Print Area.
Using Print Preview.
Choosing a Printer.
Setting Other Printing Options.
Saving a Workbook for the First Time.
Saving a Workbook under a Different Name.
Saving a Workbook for use in a Previous Version of Excel.
Choosing a Different File Format.

Section 3. Formatting Cells and Ranges.
Inserting and Deleting Cells.
Adding a New Cell to a Worksheet.
Deleting a Cell from a Worksheet.
Manually Formatting Cell
Selecting Cells and Ranges.
Aligning a Cell’s
Choosing Fonts and Font Sizes.
Applying Special Character Attributes.
Changing Font Color.
Filling Cells with Color.
Applying Number Formats.
Wrapping Text in a Cell.
Merging and Splitting Cells.
Placing Borders around a Cell.
Copying Cell Formatting with the Format Painter.
Formatting Cells with Styles.
Applying a Cell Style.
Modifying a Cell Style.
Working with Hyperlinked Data.
Placing a Hyperlink in a Cell.
Removing a Hyperlink.
Applying Conditional Formatting to Cells.
Using the Rule Manager to Apply Conditional Formats.
Allowing Multiple Conditional Formatting Rules to be True.
Applying Specific Conditional Formats.
Clearing a Cell’s Formatting.

Section 4. Worksheet Formatting.
Working with Rows and Columns.
Inserting or Deleting a Row or Column.
Modifying Row Height or Column Width.
Formatting an Entire Row or Column.
Hiding and Unhiding a Row or Column.
Using Themes.
Choosing a Theme for a Worksheet.
Customizing a Theme.
Modifying a Worksheet’s On-Screen Appearance.
Formatting a Worksheet’s Background.
Changing the Color of a Worksheet’s Tab.
Viewing and Printing a Worksheet’s Gridlines.
Viewing and Printing Column and Row Headings.
Inserting Headers and Footers.
Adding Page Numbers to a Worksheet.
Inserting a Built-In Header or Footer.
Adding Content to a Header or Footer.
Page Layout.
Adding and Moving a Page Break.
Setting Margins.
Setting a Worksheet’s Orientation on the Page.
Scaling a Worksheet to Fit on a Printed Page.

Section 5. Managing Worksheets.
Organizing Worksheets.
Copying a Worksheet.
Rearranging the Worksheets in a Workbook.
Renaming a Worksheet.
Hiding and Unhiding a Worksheet.
Inserting a New Worksheet into a Workbook.
Deleting a Worksheet from a Workbook.
Finding and Replacing Data.
Locating Data with the Find Command.
Replacing Data with the Replace Command.
Navigating a Worksheet with the Go To Command.

Section 6. Working With Data.
Ensuring Your Data’s Integrity.
Restricting Cell Entries to Certain Data Types.
Allowing Only Specific Values to Be Entered in Cells.
Removing Duplicate Cells, Rows, or Columns from a Worksheet.
Sorting Data.
Sorting Data on a Single Criterion.
Sorting Data on Multiple Criteria.
Sorting Data by Using Conditional Formatting.
Sorting Data By Using Cell Attributes.
Filtering Data.
Using AutoFilter.
Creating a Custom AutoFilter.
Filtering Data by Using Conditional Formatting.
Filtering Data by Using Cell Attributes.
Subtotaling Data.
Grouping and Ungrouping Data for Subtotaling.
Subtotaling Data in a List.
Setting Up Data in Table Format.
Formatting a Table with a Quick Style.
Inserting a Row for Totals in a Table.
Add and Remove Rows or Columns in a Table.

Section 7. Using Basic Formulas and Functions.
Building Basic Formulas.
Creating a Formula That Performs Addition.
Creating a Formula That Performs Subtraction.
Creating a Formula The Performs Multiplication.
Creating a Formula That Performs Division.
Workplace Ready (Starting a Worksheet from a Template, with focus on built-in formulas?).
Using Cell References in Formulas.
Using Relative Cell References in a Formula.
Using Absolute Cell References in a Formula.
Referring to Data in Another Worksheet.
Referring to Data in Another Workbook.
Using Cell Ranges in Formulas.
Naming a Range.
Changing a Range’s Size.
Keeping Track of Ranges.
Creating a Formula That Operates on a Named Range.
Summarizing Data with Functions.
Using SUM.
Using COUNT.
Using COUNTA.
Using AVERAGE.
Using MIN.
Using MAX.
Using Formulas to Create Subtotals.
Selecting Ranges for Subtotaling.
Modifying a Range in a Subtotal.
Building Formulas to Subtotal and Total.
Controlling the Appearance of Formulas.
Displaying Formulas on the Screen.
Printing Formulas.

Section 8. Using More Advanced Formulas.
Using Formulas to Apply Conditional Formatting.
Using SUMIF.
Using SUMIFS.
Using COUNTIF.
Using COUNTIFS.
Using AVERAGEIF.
Using AVERAGEIFS.
Using Formulas to Look Up Data in a Workbook.
Using VLOOKUP.
Using HLOOKUP.
Adding Conditional Logic Functions to Formulas.
Using IF.
Using AND.
Using OR.
Using NOT.
Using IFERROR.
Using Formulas to Format Text.
Using PROPER.
Using UPPER.
Using LOWER.
Using Formulas to Modify Text.
Using SUBSTITUTE.
Using a Formula to Convert Text to Columns.

Section 9. Creating Charts from Your Data.
Building Charts.
Selecting Data to Include in a Chart.
Choosing the Right Chart for Your Data.
Creating a Bar Chart.
Formatting a Chart with a Quick Style.
Manually Formatting the Parts of a Chart.
Changing the Chart’s Fill Color or Pattern.
Changing the Chart’s Border Line.
Formatting the Data Series.
Modifying the Chart’s Legend.
Modifying a Chart.
Adding Elements to a Chart.
Deleting Elements from a Chart.
Moving a Chart.
Resizing a Chart.
Choosing a Different Chart Type.

Section 10. Adding Pictures and Shapes to a Worksheet.
Inserting Pictures.
Inserting a Picture from a File.
Inserting a Clip Art Picture.
Using SmartArt Graphics.
Adding Shapes.
Drawing Lines.
Inserting Basic Shapes.
Drawing a Block Arrow.
Creating a Flowchart.
Copying or Moving a Graphic.
Formatting Graphics.
Resizing a Graphic.
Rotating a Graphic.
Resetting a Picture to Its Original State.

Section 11. Securing and Sharing Documents.
Securing Your Work before Sharing It with Others.
Protecting a Workbook or Worksheet.
Setting Access Permissions to a Workbook.
Allowing Multiple Users to Edit a Workbook Simultaneously.
Marking a Document as Final.
Digitally Signing a Workbook.
Using the Document Inspector.
Distributing a Workbook by E-Mail.
Tracking Changes to a Workbook.
Turning Change-Tracking On and Off.
Inserting Tracked Changes.
Deleting Your Changes.
Accepting Changes from Another User.
Rejecting Changes from Another User.
Setting Track Change Options.
Adding Comments to a Workbook.
Inserting a Comment.
Viewing Comments.
Editing a Comment.
Deleting a Comment.
Viewing Comments from Another User.

2009-06-14

SSAS: SSMS Dimension properties display

Looking for the effect of dimension properties on MDX in SSMS?
It's here.

Just double clicking member in the result pane
(say "Aaron A. Allen" above NT$80,450,596.98)

MCAS: 77-602 Excel Exam Syllabus breakdown

The Excel 2007 exam syllabus has many changes comparing to the previous exam (2003, 2003 Expert)
The objectives are also became abstracted. The content in 2003 are much detailed to task level.
If you get confused with some 2007 sub-topic.
let's check with the breakdown below. The breakdown is summarized from the official study guide.

1. Creating and Manipulating Data
1.1. Insert data by using AutoFill
- Filling Series
- AutoFill Option on adjacent cell e.g. format
- Custom Fill List
- Copy text/format to adjacent cell
1.2. Ensure data integrity
- Validation
- Remove Duplicate Rows
1.3. Modify cell contents and formats
- Paste special
1.4. Change Worksheet Views
- page layout: Views (e.g. page break view)
- Zoom
- Ribbon Display/Formula bar
- Freeze and split
- Multiple Window
1.5. Manage worksheets
- Hide/Show
- moving and copying



2. Formatting Data and Content
2.1. Format worksheets
-Themes(Apply,Modify,Custom Template)
-Page Layout: Grid lines and heading
-Worksheet Tabs name/Color/Background(WordArts)
2.2. Insert and modify rows and columns
- Insert/Delete, Hide/Show, Height/Width/AutoFit,
- Other Formating e.g. TextWrap/Align/Orientation
2.3. Format cells and cell content
- Standard Format(curreny/text/date...) , Custom Format
- Hyperlinks
- Merged Cell
- Formating(Font,border)
- Cell styles
2.4. Format data as a table
- Include Table Style,Total Row


3. Creating and Modifying Formulas
3.1. Reference data in formulas
- absolute reference, 3D reference
- name: define, manage
3.2. Summarize data using a formula
- sum/count/counta(Count empty)/average/min/max
3.3. Summarize data using subtotals
- subtotal (outlining)
3.4. Conditionally summarize data by using a formula
- averageif,countif,sumif,averageifs,countifs,sumifs
3.5. Look up data by using a formula
- vlookup/hlookup
3.6. Use conditional logic in a formula
- if,and,or,not,iferror
3.7. Format or modify text by using formulas
- lower,proper,upper,
- replace substitute
- text to columns feature
3.8. Display and print formulas
- display formula (ctrl+`)

4. Presenting Data Visually
4.1. Create and format charts
plot chart-chart type, switch column
moving to another sheet
sizing, format ->size
4.2. Modify charts
editing data
range selector
chart element
chart title/format,axes/legend, data labels,gridlines
4.3. Apply conditional formatting
4.4. Insert and modify illustrations
- insert/replace
- insert in footer
- smart arts
- sharps/replace/add text/modify
4.5. Outline data
4.6. Sort and filter data

5. Collaborating and Securing Data
5.1. Manage changes to workbooks
- change tracking
- comment
5.2. Protect and share workbooks
- password protect workbooks
- workbook/worksheet protection
- workbook sharing
5.3. Prepare workbooks for distribution
- workbook properties
- document inspectors
- restrict permission
- digital signatures
- finalizing
5.4. Save workbooks
- file format
- compatibiltiy checker
5.5. Set print options for printing data, worksheets, and workbooks
- page break
- page setup
- header and footer

Sub topics removed from the final syllabus (May be merged with others)
5.6. Filter data by using AutoFilter
5.7. Filter and sort data by using conditional formatting
5.8. Filter and sort data by using cell attributes


However, It's recommended to practice some feature not appeared but related too, for example, pivot table.

2009-05-30

Excel 2010 "technical preview" Follow up

What's New in Excel 2010
Here are some different that I found it on interface between the 2007 and 2010.
However, I think there should be more in the 2010 release.

In general, there some enhancement on graphics, charts(Sparklines), pivot table (Slicer).
The help there are still in 2007 version.

Excel option, date format

Excel Option Cursor movement (Not sure what it is yet)




Excel option:Pivot table: Prevent hang when undoing

Excel option: Customizable Ribbon finally...


Review unsaved draft version of this excel, they put this visually finally..





An IQ test? All wordings were changed into small icons



Extra "All merging conditional formats" option



Screen clipping(capturing tool) and sparklines


3 Types of sparklines


Images format + background removal


Slicer for pivot table, display selection quickly


VBA... Seems nothing new there, still 6.5

2009-05-28

Excel 2007 Multi Language Interface comparison (command) 介面多語言對比 (功能編) (繁中/簡中/English/日本語)

EXCEL 2007 多語言菜單/工具列對比 (繁中/簡中/English/日本語)
你可以在左上方選擇下載Excel.

Generated from VBA...

2009-05-24

Excel 2007 Multi Language Interface comparison (Menu) 介面多語言對比 (菜單編)

EXCEL 2007 多語言菜單對比 (繁中/簡中/English/日本語),
方便要處理兩岸三地不同用戶語言的支援人員朋友 (包括我自己...)

HOME





INSERT





PAGE LAYOUT




FORMULA





DATA





REVIEW





VIEW





DEVELOPER